tests: skip tst_QApplication::abortQuitOnShow() on Wayland - 2

This amends 91079e64d89be5dbec6c9f33f84d3e483aec31e0 .

It needs to have a QGuiApplication object before the check.

Task-number: QTBUG-123172
Change-Id: I51929431e69e4584c46e2dc08ca9c33b48b900c6
Reviewed-by: Inho Lee <inho.lee@qt.io>
(cherry picked from commit e743931294d9d9c4e5a27d2644fd1cd354ce56cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Liang Qi 2024-07-23 13:42:39 +02:00 committed by Qt Cherry-pick Bot
parent 0fa33b8c61
commit eadaecdc63

View File

@ -2723,11 +2723,12 @@ private:
void tst_QApplication::abortQuitOnShow()
{
int argc = 0;
QApplication app(argc, nullptr);
if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
QSKIP("Wayland: This crash, see QTBUG-123172.");
int argc = 0;
QApplication app(argc, nullptr);
ShowCloseShowWidget window1(false);
window1.setWindowTitle(QLatin1String(QTest::currentTestFunction()));
window1.show();