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>
This commit is contained in:
parent
8fc6690748
commit
499b4991f4
@ -466,6 +466,11 @@ static QString msgRectMismatch(const QRect &r1, const QRect &r2)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool isPlatformWayland()
|
||||||
|
{
|
||||||
|
return !QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive);
|
||||||
|
}
|
||||||
|
|
||||||
void tst_QWindow::positioning()
|
void tst_QWindow::positioning()
|
||||||
{
|
{
|
||||||
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(
|
if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(
|
||||||
@ -473,7 +478,7 @@ void tst_QWindow::positioning()
|
|||||||
QSKIP("This platform does not support non-fullscreen windows");
|
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.");
|
QSKIP("Wayland: This fails. Figure out why.");
|
||||||
|
|
||||||
// Some platforms enforce minimum widths for windows, which can cause extra resize
|
// Some platforms enforce minimum widths for windows, which can cause extra resize
|
||||||
@ -779,7 +784,7 @@ void tst_QWindow::isExposed()
|
|||||||
|
|
||||||
window.hide();
|
window.hide();
|
||||||
|
|
||||||
if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
|
if (isPlatformWayland())
|
||||||
QSKIP("Wayland: This is flaky. Figure out why.");
|
QSKIP("Wayland: This is flaky. Figure out why.");
|
||||||
|
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
@ -1337,7 +1342,7 @@ void tst_QWindow::touchCancelWithTouchToMouse()
|
|||||||
|
|
||||||
void tst_QWindow::touchInterruptedByPopup()
|
void tst_QWindow::touchInterruptedByPopup()
|
||||||
{
|
{
|
||||||
if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
|
if (isPlatformWayland())
|
||||||
QSKIP("Wayland: This test crashes with xdg-shell unstable v6");
|
QSKIP("Wayland: This test crashes with xdg-shell unstable v6");
|
||||||
|
|
||||||
InputTestWindow window;
|
InputTestWindow window;
|
||||||
@ -1834,7 +1839,7 @@ void tst_QWindow::mask()
|
|||||||
|
|
||||||
void tst_QWindow::initialSize()
|
void tst_QWindow::initialSize()
|
||||||
{
|
{
|
||||||
if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
|
if (isPlatformWayland())
|
||||||
QSKIP("Wayland: This fails. Figure out why.");
|
QSKIP("Wayland: This fails. Figure out why.");
|
||||||
|
|
||||||
QSize defaultSize(0,0);
|
QSize defaultSize(0,0);
|
||||||
@ -1907,7 +1912,7 @@ void tst_QWindow::modalDialog()
|
|||||||
|
|
||||||
void tst_QWindow::modalDialogClosingOneOfTwoModal()
|
void tst_QWindow::modalDialogClosingOneOfTwoModal()
|
||||||
{
|
{
|
||||||
if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive))
|
if (isPlatformWayland())
|
||||||
QSKIP("Wayland: This fails. Figure out why.");
|
QSKIP("Wayland: This fails. Figure out why.");
|
||||||
|
|
||||||
QWindow normalWindow;
|
QWindow normalWindow;
|
||||||
|
Loading…
Reference in New Issue
Block a user