tests: skip tst_QDialog::showAsTool() on Wayland

QWindow::requestActivate() is not supported.

Task-number: QTBUG-107153
Pick-to: 6.4 6.2
Change-Id: Id8f9cc1d6a29b4d608a080f5b40a5369d7bd8da9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Liang Qi 2022-10-03 12:58:37 +02:00
parent f8898cae83
commit 65d9b48a70
1 changed files with 4 additions and 0 deletions

View File

@ -286,6 +286,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());