diff options
Diffstat (limited to 'tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp')
-rw-r--r-- | tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp index 91a9c49b00..64e4582366 100644 --- a/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp +++ b/tests/auto/widgets/widgets/qsplashscreen/tst_qsplashscreen.cpp @@ -36,6 +36,7 @@ class tst_QSplashScreen : public QObject private slots: void checkCloseTime(); + void checkScreenConstructor(); }; class CloseEventSplash : public QSplashScreen @@ -69,5 +70,16 @@ void tst_QSplashScreen::checkCloseTime() QVERIFY(w.windowHandle()->isExposed()); } +void tst_QSplashScreen::checkScreenConstructor() +{ + for (const auto screen : QGuiApplication::screens()) { + QSplashScreen splash(screen); + splash.show(); + QCOMPARE(splash.screen(), screen); + QVERIFY(splash.windowHandle()); + QCOMPARE(splash.windowHandle()->screen(), screen); + } +} + QTEST_MAIN(tst_QSplashScreen) #include "tst_qsplashscreen.moc" |