summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-17 14:59:34 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-12-21 22:08:01 +0000
commit674430cea0edafc374552b4743e2da7d29143453 (patch)
tree879a58bac3c83d858a5daa125511d294537c01da /src/widgets/kernel/qapplication.cpp
parent88a02c4d6342d092edf3114420e9153c52c90294 (diff)
Silence maybe_uninitialized warning with gcc -Og
GCC produces false positives for maybe_uninitialized when compiling with -Og in these three places. Simply initialize the variables to silence it. This should be entirely cost-free for normal compilation. Change-Id: Iab778a6ba25993f78f190e928c1fcc2dbd8b2fcd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r--src/widgets/kernel/qapplication.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index 358838b4e9..128b5dc2b8 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -3305,7 +3305,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(),
wheel->modifiers(), phase, wheel->source(), wheel->inverted());
bool eventAccepted;
- while (w) {
+ do {
we.spont = spontaneous && w == receiver;
we.ignore();
res = d->notify_helper(w, &we);
@@ -3323,7 +3323,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
we.p += w->pos();
w = w->parentWidget();
- }
+ } while (w);
wheel->setAccepted(eventAccepted);
} else if (!spontaneous) {
// wheel_widget may forward the wheel event to a delegate widget,