mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
QScopedPointer removes QDrag to early and will still be accessed in another thread. #1
This commit is contained in:
@@ -82,7 +82,11 @@ void ElementsTreeView::startElementDrag(const ElementsLocation &location)
|
|||||||
{
|
{
|
||||||
if (! location.exist()) return;
|
if (! location.exist()) return;
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
QDrag* drag = new QDrag(this);
|
||||||
|
#else
|
||||||
QScopedPointer<QDrag> drag(new QDrag(this));
|
QScopedPointer<QDrag> drag(new QDrag(this));
|
||||||
|
#endif
|
||||||
|
|
||||||
QString location_str = location.toString();
|
QString location_str = location.toString();
|
||||||
QMimeData *mime_data = new QMimeData();
|
QMimeData *mime_data = new QMimeData();
|
||||||
|
|||||||
Reference in New Issue
Block a user