summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-07-09 12:50:00 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-11 14:52:17 +0200
commitcf2b5a7722e2d919f57f7094124dbcf52ae79b68 (patch)
tree41ebeb2ffce5176a5fcda0aae3fe679ffd6e64f2 /src/widgets
parent9de46b2b9387e813e3194765652699aa6ad4d158 (diff)
Clear qt_button_down widget when starting a drag.
Prevent pickMouseReceiver() from using the widget from which the drag was started. Task-number: QTBUG-26145 Change-Id: I65d4c295a894193e41c676fb9fd1f7113c2631b5 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/kernel/qapplication.cpp9
-rw-r--r--src/widgets/kernel/qapplication_p.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 997a663c27..6634a2eb69 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -4503,6 +4503,15 @@ void QApplicationPrivate::notifyThemeChanged()
initSystemPalette();
}
+#ifndef QT_NO_DRAGANDDROP
+void QApplicationPrivate::notifyDragStarted(const QDrag *drag)
+{
+ // Prevent pickMouseReceiver() from using the widget where the drag was started after a drag operation.
+ QGuiApplicationPrivate::notifyDragStarted(drag);
+ qt_button_down = 0;
+}
+#endif // QT_NO_DRAGANDDROP
+
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
diff --git a/src/widgets/kernel/qapplication_p.h b/src/widgets/kernel/qapplication_p.h
index 7b69129d29..3ce590865b 100644
--- a/src/widgets/kernel/qapplication_p.h
+++ b/src/widgets/kernel/qapplication_p.h
@@ -195,6 +195,9 @@ public:
protected:
void notifyThemeChanged();
+#ifndef QT_NO_DRAGANDDROP
+ void notifyDragStarted(const QDrag *);
+#endif // QT_NO_DRAGANDDROP
public:
static QFont *sys_font;