diff options
author | Morten Johan Sorvig <morten.sorvig@nokia.com> | 2011-12-16 13:12:39 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-14 23:02:12 +0100 |
commit | d6311a06515221e41edb69722b571080c08d11ce (patch) | |
tree | 68d67e7f76fe0a826a2b6237890dfe9e3117e228 /tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp | |
parent | 439a78974576894b23bce0621e49ce4a593428a9 (diff) |
Cocoa: Improve basic window handling.
Refactor NSWindow creation into createNSWindow and
setNSWindow. This is necessary to support QMacNativeWidget
where we re-use an already created window.
Implement popup window handling. Make sure the window
is displayed correctly and closes when it should.
Take control over window activation in order to prevent
infinite loops involving the QtCreator "cmd-k" window.
Activation events are for now not sent to popup-type
windows.
There is now a different set of test failures: add
and remove some QEXPECT_FAILs.
Change-Id: I229761b59f90c9815b968eacc2cbc9c20cc5047e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp index b47ef659be..e20111c652 100644 --- a/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp +++ b/tests/auto/widgets/kernel/qtooltip/tst_qtooltip.cpp @@ -90,12 +90,8 @@ void tst_QToolTip::task183679_data() { QTest::addColumn<Qt::Key>("key"); QTest::addColumn<bool>("visible"); -#ifdef Q_OS_MAC - const bool visibleAfterNonModifier = false; -#else - const bool visibleAfterNonModifier = true; -#endif - QTest::newRow("non-modifier") << Qt::Key_A << visibleAfterNonModifier; + + QTest::newRow("non-modifier") << Qt::Key_A << true; QTest::newRow("Shift") << Qt::Key_Shift << true; QTest::newRow("Control") << Qt::Key_Control << true; QTest::newRow("Alt") << Qt::Key_Alt << true; @@ -116,9 +112,6 @@ void tst_QToolTip::task183679() widget.showDelayedToolTip(100); QTest::qWait(300); -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "QTBUG-23707", Continue); -#endif QTRY_VERIFY(QToolTip::isVisible()); QTest::keyPress(&widget, key); @@ -128,12 +121,6 @@ void tst_QToolTip::task183679() // auto-close timeout (currently 10000 msecs) QTest::qWait(1500); -#ifdef Q_OS_MAC - QEXPECT_FAIL("Shift", "QTBUG-23707", Continue); - QEXPECT_FAIL("Control", "QTBUG-23707", Continue); - QEXPECT_FAIL("Alt", "QTBUG-23707", Continue); - QEXPECT_FAIL("Meta", "QTBUG-23707", Continue); -#endif QCOMPARE(QToolTip::isVisible(), visible); } |