From de7154c0ed2948d307a063086476364d136f0b29 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 3 Oct 2022 12:58:37 +0200 Subject: [PATCH] tests: skip tst_QDialog::showAsTool() on Wayland QWindow::requestActivate() is not supported. Task-number: QTBUG-107153 Change-Id: Id8f9cc1d6a29b4d608a080f5b40a5369d7bd8da9 Reviewed-by: Eskil Abrahamsen Blomfeldt (cherry picked from commit 65d9b48a70b295eb239fe68e3c5c103546a71d86) Reviewed-by: Liang Qi --- tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp index b18a5c9d12c..b2b2e026f78 100644 --- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp +++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp @@ -21,6 +21,7 @@ #include #include #include +#include QT_FORWARD_DECLARE_CLASS(QDialog) @@ -284,6 +285,10 @@ void tst_QDialog::showAsTool() { if (QStringList{"xcb", "offscreen"}.contains(QGuiApplication::platformName())) QSKIP("activeWindow() is not respected by all Xcb window managers and the offscreen plugin"); + + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation)) + QSKIP("QWindow::requestActivate() is not supported."); + DummyDialog testWidget; testWidget.resize(200, 200); testWidget.setWindowTitle(QTest::currentTestFunction());