summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-14 19:11:05 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-14 19:11:05 (GMT)
commit2a1c4cbca0db45fa911b6d4e9a5ae553f8289353 (patch)
tree2336957d7c13821745c5e3215b0c322bbeed8ddd /src
parent30b415bf8644961d3e5b108b0b7c1b1abf07f685 (diff)
parent33f9950996ada06fc39b68f6656b1defdccd8c3a (diff)
downloadQt-2a1c4cbca0db45fa911b6d4e9a5ae553f8289353.zip
Qt-2a1c4cbca0db45fa911b6d4e9a5ae553f8289353.tar.gz
Qt-2a1c4cbca0db45fa911b6d4e9a5ae553f8289353.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: fix QTBUG-13501 - crash when a gesture is accepted but not consumed Add test: assert when gesture is never accepted.
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index caeeeb9..2fd2f46 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -4367,11 +4367,13 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
eventAccepted = ge.isAccepted();
for (int i = 0; i < gestures.size(); ++i) {
QGesture *g = gestures.at(i);
- if ((res && eventAccepted) || (!eventAccepted && ge.isAccepted(g))) {
+ // Ignore res [event return value] because handling of multiple gestures
+ // packed into a single QEvent depends on not consuming the event
+ if (eventAccepted || ge.isAccepted(g)) {
// if the gesture was accepted, mark the target widget for it
gestureEvent->d_func()->targetWidgets[g->gestureType()] = w;
gestureEvent->setAccepted(g, true);
- } else if (!eventAccepted && !ge.isAccepted(g)) {
+ } else {
// if the gesture was explicitly ignored by the application,
// put it back so a parent can get it
allGestures.append(g);