summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorJesper Thomschutz <jesper.thomschutz@nokia.com>2010-09-15 07:45:55 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-09-15 07:46:55 (GMT)
commitf78119906b0ffc7fd3dd36d6d827d456478a7fd5 (patch)
treee161fe397dedd702f86d186ef32eabcf7cae00d8 /src/gui/kernel/qapplication.cpp
parent66420856664c7a412b3c9efe4be6ff7a6061e5f2 (diff)
parent05ab8ad1577fc038aa2b3bd96cedda54e6a64979 (diff)
downloadQt-f78119906b0ffc7fd3dd36d6d827d456478a7fd5.zip
Qt-f78119906b0ffc7fd3dd36d6d827d456478a7fd5.tar.gz
Qt-f78119906b0ffc7fd3dd36d6d827d456478a7fd5.tar.bz2
git Merge branch '4.7-upstream' into 4.7-doc
Conflicts: src/gui/kernel/qgesturemanager.cpp
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-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);