summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2016-06-18 16:07:27 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-26 06:15:57 +0000
commit7179846a0141c2683c30d03c43a7c12fde98801f (patch)
treea994458581ccd544d3701e445976c11804c26861 /src
parentec73b9ff3b0064cf7760baeb826d912d9a30d227 (diff)
QQuickDragAttached: set actual drag source when instantiating QDrag
QDrag's constructor parameter is used as drag source in a DnD operation; objects receiving QDrag{Enter,Move,Leave}Event will get this object when calling event->source(). Task-number: QTBUG-54195 Change-Id: Id3ed7e8d62a8539983c7c21c45f8f1d72f9a2e30 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickdrag.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickdrag.cpp b/src/quick/items/qquickdrag.cpp
index e1b7ef47d8..71217ce146 100644
--- a/src/quick/items/qquickdrag.cpp
+++ b/src/quick/items/qquickdrag.cpp
@@ -713,7 +713,7 @@ Qt::DropAction QQuickDragAttachedPrivate::startDrag(Qt::DropActions supportedAct
{
Q_Q(QQuickDragAttached);
- QDrag *drag = new QDrag(q);
+ QDrag *drag = new QDrag(source ? source : q);
QMimeData *mimeData = new QMimeData();
Q_FOREACH (const QString &key, externalMimeData.keys()) {