diff options
author | David Faure <david.faure@kdab.com> | 2021-03-18 11:24:10 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2021-03-18 11:38:51 +0100 |
commit | 0e67fb41cfc4b4bfbaa7dc75f8ddebdf5a08e836 (patch) | |
tree | 02966260ed1cb094f097565530b62eac164c7198 /tests/auto/qx11info/tst_qx11info.cpp | |
parent | 64e2a26867a7ba66b3efbda625bf41e6e7efd794 (diff) | |
download | qtx11extras-0e67fb41cfc4b4bfbaa7dc75f8ddebdf5a08e836.tar.gz |
Fix crash due to bad cast to QXcbScreen
Fixes: QTBUG-91913
Change-Id: I498b8a18b7f47f94fd610f13797473951ea98f85
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'tests/auto/qx11info/tst_qx11info.cpp')
-rw-r--r-- | tests/auto/qx11info/tst_qx11info.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qx11info/tst_qx11info.cpp b/tests/auto/qx11info/tst_qx11info.cpp index b4207c1..36dd202 100644 --- a/tests/auto/qx11info/tst_qx11info.cpp +++ b/tests/auto/qx11info/tst_qx11info.cpp @@ -43,6 +43,7 @@ private slots: void isPlatformX11(); void appTime(); void peeker(); + void isCompositingManagerRunning(); }; void tst_QX11Info::staticFunctionsBeforeQApplication() @@ -374,6 +375,17 @@ void tst_QX11Info::peeker() QVERIFY(QTest::qWaitForWindowExposed(&test)); } +void tst_QX11Info::isCompositingManagerRunning() +{ + int argc = 0; + QGuiApplication app(argc, 0); + const bool b = QX11Info::isCompositingManagerRunning(); + Q_UNUSED(b); + const bool b2 = QX11Info::isCompositingManagerRunning(0); + Q_UNUSED(b2); + // just check that it didn't crash (QTBUG-91913) +} + QTEST_APPLESS_MAIN(tst_QX11Info) #include "tst_qx11info.moc" |