summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp')
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index b4343d8d17..13f971f5f0 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include "../../../shared/highdpi.h"
@@ -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());
@@ -691,7 +695,7 @@ void tst_QDialog::virtualsOnClose()
// Qt doesn't deliver events to QWidgets closed during destruction
QCOMPARE(filter.closeEventCount, 0);
// QDialog doesn't emit signals when closed by destruction
- QCOMPARE(rejectedSpy.count(), 0);
+ QCOMPARE(rejectedSpy.size(), 0);
}
}
@@ -744,7 +748,7 @@ void tst_QDialog::quitOnDone()
// also quit with a timer in case the test fails
QTimer::singleShot(1000, QApplication::instance(), &QApplication::quit);
QApplication::exec();
- QCOMPARE(quitSpy.count(), 1);
+ QCOMPARE(quitSpy.size(), 1);
}
void tst_QDialog::focusWidgetAfterOpen()