diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-03-02 15:28:24 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-03-06 20:02:04 +0000 |
commit | 499b4991f4a88afa85dd8803dbf8346182023b25 (patch) | |
tree | 5d56f1463b7fa570acb49aa03c79a99bb74c4f37 /tests/auto/gui/kernel | |
parent | 8fc66907480d986a42ad980ee5a68e7098c5a9d2 (diff) |
Make platform checks for Wayland more readable
And make it easier to fix if platformName == wayland-egl etc.
Change-Id: Ia2d62ba003796e08f3e8a5bbfd0c3fd9d185e4e0
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r-- | tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index f4097e36ff..339335b3a7 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -466,6 +466,11 @@ static QString msgRectMismatch(const QRect &r1, const QRect &r2) return result; } +static bool isPlatformWayland() +{ + return !QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive); +} + void tst_QWindow::positioning() { if (!QGuiApplicationPrivate::platformIntegration()->hasCapability( @@ -473,7 +478,7 @@ void tst_QWindow::positioning() QSKIP("This platform does not support non-fullscreen windows"); } - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) + if (isPlatformWayland()) QSKIP("Wayland: This fails. Figure out why."); // Some platforms enforce minimum widths for windows, which can cause extra resize @@ -779,7 +784,7 @@ void tst_QWindow::isExposed() window.hide(); - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) + if (isPlatformWayland()) QSKIP("Wayland: This is flaky. Figure out why."); QCoreApplication::processEvents(); @@ -1337,7 +1342,7 @@ void tst_QWindow::touchCancelWithTouchToMouse() void tst_QWindow::touchInterruptedByPopup() { - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) + if (isPlatformWayland()) QSKIP("Wayland: This test crashes with xdg-shell unstable v6"); InputTestWindow window; @@ -1834,7 +1839,7 @@ void tst_QWindow::mask() void tst_QWindow::initialSize() { - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) + if (isPlatformWayland()) QSKIP("Wayland: This fails. Figure out why."); QSize defaultSize(0,0); @@ -1907,7 +1912,7 @@ void tst_QWindow::modalDialog() void tst_QWindow::modalDialogClosingOneOfTwoModal() { - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) + if (isPlatformWayland()) QSKIP("Wayland: This fails. Figure out why."); QWindow normalWindow; |