summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/util
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2014-07-02 16:46:24 +0200
committerDavid Faure <david.faure@kdab.com>2014-07-10 21:54:19 +0200
commit50c04d631858639c630e85456e7e003a80e33493 (patch)
tree21dd2c6cb9026395bfdf10056dfe35eca0f641b9 /tests/auto/widgets/util
parent53ed4de02278b17708199891f9b56c6e6e04103b (diff)
Session management for OS X
This patch aims to implement the session management available on OS X. Currently applicationShouldTerminate is just a go through that closes everything and ends the application. The new implementation calls first appCommitData and cancels the termination properly if required. This means that if a user wishes to logout, Qt applications can now cancel that like e.g. answering to Safari asking whether it is ok to close because of a number of opened tab/window. Task-number: QTBUG-33034 Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8 Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'tests/auto/widgets/util')
-rw-r--r--tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
index f8924f4de8..a8df1ed2f5 100644
--- a/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
+++ b/tests/auto/widgets/util/qsystemtrayicon/tst_qsystemtrayicon.cpp
@@ -144,7 +144,12 @@ void tst_QSystemTrayIcon::lastWindowClosed()
QTimer::singleShot(2500, &window, SLOT(close()));
QTimer::singleShot(20000, qApp, SLOT(quit())); // in case the test fails
qApp->exec();
+
+#ifdef Q_OS_OSX
+ QVERIFY(spy.count() == 2);
+#else
QVERIFY(spy.count() == 1);
+#endif
}
QTEST_MAIN(tst_QSystemTrayIcon)