tests: skip tst_QDialog::showAsTool() on Wayland

QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Change-Id: Id8f9cc1d6a29b4d608a080f5b40a5369d7bd8da9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 65d9b48a70b295eb239fe68e3c5c103546a71d86)
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Liang Qi 2022-10-03 12:58:37 +02:00
parent 3a811eae97
commit de7154c0ed

View File

@ -21,6 +21,7 @@
#include <private/qguiapplication_p.h>
#include <qpa/qplatformtheme.h>
#include <qpa/qplatformtheme_p.h>
#include <qpa/qplatformintegration.h>
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());