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)

Pick-to: 6.4
Task-number: QTBUG-104241
Change-Id: Ibf5f8968f3979b789ef68f92768419bef4500fb3
Reviewed-by: Inho Lee <inho.lee@qt.io>
bb10
Eskil Abrahamsen Blomfeldt 2022-06-30 07:01:53 +02:00
parent 8d9301b413
commit 3fee97c4ab
1 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,8 @@
#include <private/qstatictext_p.h>
#include <private/qopengltextureglyphcache_p.h>
#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
#include <qpa/qplatformintegration.h>
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.");