summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2011-01-28 05:14:27 (GMT)
committerBea Lam <bea.lam@nokia.com>2011-01-28 05:14:27 (GMT)
commit5010d88ff9bbe32f3cc0477647370cfe8b49394b (patch)
tree30a41555803b2e2b9d877bd48e84e6aa2ea448bd /tests
parentde223987715ad747496099165121aabdc38c8b0a (diff)
downloadQt-5010d88ff9bbe32f3cc0477647370cfe8b49394b.zip
Qt-5010d88ff9bbe32f3cc0477647370cfe8b49394b.tar.gz
Qt-5010d88ff9bbe32f3cc0477647370cfe8b49394b.tar.bz2
Fix failing test on mac for Qt.application
setActiveWindow(0) on mac does not deactivate the current application.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
index 3011257..64f327b 100644
--- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
+++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
@@ -87,9 +87,13 @@ void tst_qdeclarativeapplication::active()
QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0);
// not active again
+ // on mac, setActiveWindow(0) on mac does not deactivate the current application
+ // (you have to switch to a different app or hide the current app to trigger this)
+#if !defined(Q_WS_MAC)
QApplication::setActiveWindow(0);
QVERIFY(!item->property("active").toBool());
QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0);
+#endif
}
void tst_qdeclarativeapplication::layoutDirection()