diff options
author | Janne Anttila <janne.anttila@digia.com> | 2009-10-12 10:25:36 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2009-10-12 10:27:40 (GMT) |
commit | 50ff2f4dbe0a5af6c7bf18c72dd7cf49eb39ee32 (patch) | |
tree | 3ede03c5726e86ee2a5a38b9cdd479ce17730b57 /src/gui/kernel/qapplication_s60.cpp | |
parent | 8df79a473e1a7e5c79b9b10827985bf3e9501002 (diff) | |
download | Qt-50ff2f4dbe0a5af6c7bf18c72dd7cf49eb39ee32.zip Qt-50ff2f4dbe0a5af6c7bf18c72dd7cf49eb39ee32.tar.gz Qt-50ff2f4dbe0a5af6c7bf18c72dd7cf49eb39ee32.tar.bz2 |
Fix for qapplication::testDeleteLaterProcessEvents autotest in Symbian.
Deleting qt_desktopWidget eventually ends up to QSymbianControl
destructor. Calling setFocusSafely from QSymbianControl destructor
causes a new events to be posted to event queue. Posting events tries
to wakeup event dispatcher, which was deleted in QApplication
destructor before calling delete for qt_desktopWidget. This makes
application to panic.
The fix is to change is_app_closing and is_app_running flags to correct
state immediately after event dispatcher is closed down, and check the
is_app_closing flag in QSymbianControl destructor.
The change fixes panic in qapplication::testDeleteLaterProcessEvents,
and otherwise QApplication and QWidget autotest results are same as
before change.
Reviewed-by: Miikka Heikkinen
Reviewed-by: Brad
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index acd1041..6919292 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -352,7 +352,8 @@ QSymbianControl::~QSymbianControl() { if (S60->curWin == this) S60->curWin = 0; - setFocusSafely(false); + if (!QApplicationPrivate::is_app_closing) + setFocusSafely(false); S60->appUi()->RemoveFromStack(this); delete m_longTapDetector; } |