summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-12-08 12:23:23 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-12-14 10:17:14 (GMT)
commit736b8205158dd7b98af862a029b273dff6fb716d (patch)
treebf27f276537a35cfd372b66eff4e1b336daa721f
parent72c5658a54bf23f5572f169e604838143db6a352 (diff)
downloadQt-736b8205158dd7b98af862a029b273dff6fb716d.zip
Qt-736b8205158dd7b98af862a029b273dff6fb716d.tar.gz
Qt-736b8205158dd7b98af862a029b273dff6fb716d.tar.bz2
QApplication: fix crash exit whith native windows
Regression introduced in 8dd8db250d92521fda619bdcf3e1c859b37b2da0 Patch comes from the task Task-number: QTBUG-15774
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--tests/auto/qapplication/modal/main.cpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index a4ae46b..b4ff7c4 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -1101,6 +1101,9 @@ QApplication::~QApplication()
QApplicationPrivate::is_app_closing = true;
QApplicationPrivate::is_app_running = false;
+ delete QWidgetPrivate::mapper;
+ QWidgetPrivate::mapper = 0;
+
// delete all widgets
if (QWidgetPrivate::allWidgets) {
QWidgetSet *mySet = QWidgetPrivate::allWidgets;
@@ -1130,9 +1133,6 @@ QApplication::~QApplication()
delete d->ignore_cursor; d->ignore_cursor = 0;
#endif
- delete QWidgetPrivate::mapper;
- QWidgetPrivate::mapper = 0;
-
delete QApplicationPrivate::app_pal;
QApplicationPrivate::app_pal = 0;
delete QApplicationPrivate::sys_pal;
diff --git a/tests/auto/qapplication/modal/main.cpp b/tests/auto/qapplication/modal/main.cpp
index f9d8fb4..3eaaa0d 100644
--- a/tests/auto/qapplication/modal/main.cpp
+++ b/tests/auto/qapplication/modal/main.cpp
@@ -47,6 +47,7 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+ QApplication::setAttribute(Qt::AA_NativeWindows); //QTBUG-15774
base *b = new base();
return app.exec();
}