summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-04-18 16:31:19 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-04-18 16:31:19 (GMT)
commitfda9cc1d8a0e49817d1c6192c52d18dffcecf327 (patch)
treeaa9a3209339af6882eb496ab827f5ac297452d66 /src/gui/kernel/qapplication.cpp
parent6814998ab4d9c6b0990b0bf01119ace69363ce3e (diff)
parentc8aafe9a63b13a4af3049c43fcd5e8cce27db829 (diff)
downloadQt-fda9cc1d8a0e49817d1c6192c52d18dffcecf327.zip
Qt-fda9cc1d8a0e49817d1c6192c52d18dffcecf327.tar.gz
Qt-fda9cc1d8a0e49817d1c6192c52d18dffcecf327.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: qmake/generators/makefile.cpp qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp src/corelib/global/qnamespace.h src/gui/text/qtextcontrol.cpp
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index e91fe04..4096bf3 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -128,6 +128,10 @@ extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp
//#define ALIEN_DEBUG
+#if defined(Q_OS_SYMBIAN)
+#include "qt_s60_p.h"
+#endif
+
static void initResources()
{
#if defined(Q_WS_WINCE)
@@ -2438,6 +2442,11 @@ bool QApplication::event(QEvent *e)
{
Q_D(QApplication);
if(e->type() == QEvent::Close) {
+#if defined(Q_OS_SYMBIAN)
+ // In order to have proper application-exit effects on Symbian, certain
+ // native APIs have to be called _before_ closing/destroying the widgets.
+ bool effectStarted = qt_beginFullScreenEffect();
+#endif
QCloseEvent *ce = static_cast<QCloseEvent*>(e);
ce->accept();
closeAllWindows();
@@ -2451,8 +2460,14 @@ bool QApplication::event(QEvent *e)
break;
}
}
- if(ce->isAccepted())
+ if (ce->isAccepted()) {
return true;
+ } else {
+#if defined(Q_OS_SYMBIAN)
+ if (effectStarted)
+ qt_abortFullScreenEffect();
+#endif
+ }
} else if(e->type() == QEvent::LanguageChange) {
#ifndef QT_NO_TRANSLATION
setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);