diff options
author | Rafael Roquetto <rafael.roquetto.qnx@kdab.com> | 2013-05-31 15:27:50 -0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-18 06:25:52 +0200 |
commit | ed0b5e125bd76c37900a95b23f73cb6690a090f7 (patch) | |
tree | 3a77613f1ab1e6cbeda951a3de2131fe0d9c8cfb /tests/auto/gui/kernel/qwindow | |
parent | 20d667983b5d0ec434b03a68b42f610338877fe8 (diff) |
Fix tst_QWindow for fullscreen platform plugins
Some tests assume that QWindow::show() behaves like
QWindow::showNormal(), which is not true for platforms in which the show is
fullscreen, forcing QWindow::showNormal() to be explicitly called.
Change-Id: Ib5f23a4d01bc6a3a2973f57488996c8c198c45f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/gui/kernel/qwindow')
-rw-r--r-- | tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 29c72cc02e..d34ab069c3 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -176,6 +176,12 @@ void tst_QWindow::positioning() QSKIP("Multiple failures in this test on Mac OS X, see QTBUG-23059"); #endif + + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability( + QPlatformIntegration::NonFullScreenWindows)) { + QSKIP("This platform does not support non-fullscreen windows"); + } + // Some platforms enforce minimum widths for windows, which can cause extra resize // events, so set the width to suitably large value to avoid those. const QSize size = QSize(300, 40); @@ -187,7 +193,8 @@ void tst_QWindow::positioning() QCOMPARE(window.geometry().size(), size); window.setGeometry(geometry); QCOMPARE(window.geometry(), geometry); - window.show(); + // explicitly use non-fullscreen show. show() can be fullscreen on some platforms + window.showNormal(); QCoreApplication::processEvents(); QTRY_COMPARE(window.received(QEvent::Resize), 1); @@ -431,7 +438,7 @@ void tst_QWindow::testInputEvents() { InputTestWindow window; window.setGeometry(80, 80, 40, 40); - window.show(); + window.showNormal(); QVERIFY(QTest::qWaitForWindowExposed(&window)); QWindowSystemInterface::handleKeyEvent(&window, QEvent::KeyPress, Qt::Key_A, Qt::NoModifier); |