summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qdnd_qws.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2010-04-14 01:06:22 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2010-04-17 20:34:51 (GMT)
commitc8e08e5c74fbdae8a60bdd9b08966ea7fc728845 (patch)
tree1cfeb48e2013d30fd2b272afddb9942b21e31961 /src/gui/kernel/qdnd_qws.cpp
parent9b77de3effdb2eb7d6df212ab9a8a19551ecb550 (diff)
downloadQt-c8e08e5c74fbdae8a60bdd9b08966ea7fc728845.zip
Qt-c8e08e5c74fbdae8a60bdd9b08966ea7fc728845.tar.gz
Qt-c8e08e5c74fbdae8a60bdd9b08966ea7fc728845.tar.bz2
Prevent accelerators from firing on X11 and QWS during a drag
Drag-and-drop has always been modal, and already blocks key events. It should block all application accelerators as well, to avoid unexpected things like being unable to cancel the drag-and-drop (as mentioned in the task), or by being able to unexpectedly recurse the drag-and-drop event loop (by, for example, opening a file dialog). Task-number: QTBUG-9786 Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/kernel/qdnd_qws.cpp')
-rw-r--r--src/gui/kernel/qdnd_qws.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qdnd_qws.cpp b/src/gui/kernel/qdnd_qws.cpp
index e47de00..7e5afc7 100644
--- a/src/gui/kernel/qdnd_qws.cpp
+++ b/src/gui/kernel/qdnd_qws.cpp
@@ -192,6 +192,10 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e)
return false;
switch(e->type()) {
+ case QEvent::ShortcutOverride:
+ // prevent accelerators from firing while dragging
+ e->accept();
+ return true;
case QEvent::KeyPress:
case QEvent::KeyRelease: