summaryrefslogtreecommitdiffstats
path: root/tests/auto/qapplication
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>2010-01-22 13:01:54 (GMT)
committerTor Arne Vestbø <tor.arne.vestbo@nokia.com>2010-02-05 14:44:31 (GMT)
commitf75d55f1a71cae9864ca4bf12c92fcd9e34ed651 (patch)
treed0e6199a1458106c9737829157b5991b5d467226 /tests/auto/qapplication
parenta767da6f2d0fbee707f5c2fe896fa501b3da6b07 (diff)
downloadQt-f75d55f1a71cae9864ca4bf12c92fcd9e34ed651.zip
Qt-f75d55f1a71cae9864ca4bf12c92fcd9e34ed651.tar.gz
Qt-f75d55f1a71cae9864ca4bf12c92fcd9e34ed651.tar.bz2
Revert "Prevent widgets with WA_DontShowOnScreen from keeping the app running"
This reverts commit 424eabac69df3234006669a69ca0ec9653e4ce63. The commit changed behavior of WA_QuitOnClose when WA_DontShowOnScreen was used, but WA_DontShowOnScreen should only have visual effects. Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
Diffstat (limited to 'tests/auto/qapplication')
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp
index b464867..459ac2b 100644
--- a/tests/auto/qapplication/tst_qapplication.cpp
+++ b/tests/auto/qapplication/tst_qapplication.cpp
@@ -706,36 +706,6 @@ void tst_QApplication::quitOnLastWindowClosed()
QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
QSignalSpy spy2(&timer, SIGNAL(timeout()));
- QPointer<QMainWindow> mainWindow = new QMainWindow;
- QPointer<QWidget> invisibleTopLevelWidget = new QWidget;
- invisibleTopLevelWidget->setAttribute(Qt::WA_DontShowOnScreen);
-
- QVERIFY(app.quitOnLastWindowClosed());
- QVERIFY(mainWindow->testAttribute(Qt::WA_QuitOnClose));
- QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_QuitOnClose));
- QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_DontShowOnScreen));
-
- mainWindow->show();
- invisibleTopLevelWidget->show();
-
- timer.start();
- QTimer::singleShot(1000, mainWindow, SLOT(close())); // This should quit the application
- QTimer::singleShot(2000, &app, SLOT(quit())); // This makes sure we quit even if it didn't
-
- app.exec();
-
- QCOMPARE(spy.count(), 1);
- QVERIFY(spy2.count() < 15); // Should be around 10 if closing caused the quit
- }
- {
- int argc = 0;
- QApplication app(argc, 0, QApplication::GuiServer);
- QTimer timer;
- timer.setInterval(100);
-
- QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
- QSignalSpy spy2(&timer, SIGNAL(timeout()));
-
QPointer<CloseEventTestWindow> mainWindow = new CloseEventTestWindow;
QVERIFY(app.quitOnLastWindowClosed());