summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2013-06-07 07:48:56 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-11 06:41:56 (GMT)
commit32967b052adff8c59f41160088a6acecb5a81813 (patch)
tree26fd05a8bf451bc46f5172396badefea086e3dae /src
parentc894beb04096def00d53918e4079d0066d03afa7 (diff)
downloadQt-32967b052adff8c59f41160088a6acecb5a81813.zip
Qt-32967b052adff8c59f41160088a6acecb5a81813.tar.gz
Qt-32967b052adff8c59f41160088a6acecb5a81813.tar.bz2
Cleanup the QDrag when doing a drag with the right mouse button on Mac
When doing a drag with the right mouse button on Mac then it will be ignored straightaway because it will not be accepted. Therefore we need to cleanup the QDrag object as normal so that it is deleted as appropriate. Change-Id: I781fcea7b7c75775adb814090e917363fa7c9189 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index e3f0f98..16247b5 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -1284,8 +1284,11 @@ Qt::DropAction QDragManager::drag(QDrag *o)
return Qt::IgnoreAction;
/* At the moment it seems clear that Mac OS X does not want to drag with a non-left button
so we just bail early to prevent it */
- if(!(GetCurrentEventButtonState() & kEventMouseButtonPrimary))
+ if (!(GetCurrentEventButtonState() & kEventMouseButtonPrimary)) {
+ o->setMimeData(0);
+ o->deleteLater();
return Qt::IgnoreAction;
+ }
if(object) {
dragPrivate()->source->removeEventFilter(this);