QNX: Fix crash due to re-entering QToolTip::show().
authorSergio Martins <sergio.martins.qnx@kdab.com>
Wed, 21 Nov 2012 09:52:05 +0000 (09:52 +0000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 21 Nov 2012 13:02:16 +0000 (14:02 +0100)
commitd429d65628da8c60907ead7e0c8250abc7ac6695
tree07b5341e8d05a30f21eadb6eb85279e8a8c76245
parent23ea027841ae716cf057e3682604a7598cb63696
QNX: Fix crash due to re-entering QToolTip::show().

The flushWindowSystemEvents() was added to send the geometry
event synchronously. A side effect was that all input events were
also sent.

We don't want that. We're probably in setGeometry() because some
other input event brought us here, and it's still in the call
stack.

One crashy example is the static method QToolTip::show() which
uses static variables([1]). If we process input events while the
first QToolTip::show() is still on the call stack, it will trigger
a second one, deleting stuff ([1]) that the first invocation will
still need once the stack unwinds.

Change-Id: Iea22419a7f386d6b6231404666092340dfd1afed
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
src/plugins/platforms/qnx/qqnxwindow.cpp