From 70ec343b9ed40edb1d491446febfa8ffcf2bcffa Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 30 Jun 2022 07:01:53 +0200 Subject: [PATCH] Skip test which depends on window activations on Wayland Wayland does not support window activation, so rather than skipping tests based on platform name, we can use the platform capability (which will also cover future platforms with the same issue) Task-number: QTBUG-104241 Change-Id: Ibf5f8968f3979b789ef68f92768419bef4500fb3 Reviewed-by: Inho Lee (cherry picked from commit 3fee97c4ab0796fcafcdea692ff7c7e83005a2aa) Reviewed-by: Qt Cherry-pick Bot --- .../widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp index 49718a5e877..f90879ab124 100644 --- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp +++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp @@ -20,6 +20,8 @@ #include #include #include +#include +#include class tst_QOpenGLWidget : public QObject { @@ -652,8 +654,8 @@ void tst_QOpenGLWidget::stackWidgetOpaqueChildIsVisible() #ifdef Q_OS_ANDROID QSKIP("Crashes on Android, figure out why (QTBUG-102043)"); #endif - if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) - QSKIP("Wayland: This fails. Figure out why."); + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) + QSKIP("Platform does not support window activation"); if (QGuiApplication::platformName().startsWith(QLatin1String("offscreen"), Qt::CaseInsensitive)) QSKIP("Offscreen: This fails.");