From 616bc374c5a0d53fbb85382466dd6f046a0f55b5 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Tue, 30 Apr 2024 14:27:07 +0100 Subject: [PATCH] test: Fix tests with UBSAN QtQuick tests have only qGuiApp, not qApp --- tests/tst_native_qpa.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tst_native_qpa.cpp b/tests/tst_native_qpa.cpp index 3da92f363..9fde6c9d6 100644 --- a/tests/tst_native_qpa.cpp +++ b/tests/tst_native_qpa.cpp @@ -140,7 +140,7 @@ void TestNativeQPA::tst_restoreNormalFromMaximized() void TestNativeQPA::tst_restoreMaximizedFromNormal() { - if (qApp->platformName() == QLatin1String("offscreen")) { + if (qGuiApp->platformName() == QLatin1String("offscreen")) { // offscreen: calling showMaximized() on an hidden widget, puts it at pos=2,2 instead of 0,0 // Ignore this QPA. This file is for testing native QPAs only. offscreen is nice to have // if it beahaves well only. @@ -215,7 +215,7 @@ int main(int argc, char *argv[]) int exitCode = 0; for (FrontendType type : Platform::frontendTypes()) { KDDockWidgets::Core::Platform::tests_initPlatform(argc, argv, type, /*defaultToOffscreenQPA=*/false); - qDebug() << "\nTesting platform" << type << "on" << qApp->platformName() << "\n"; + qDebug() << "\nTesting platform" << type << "on" << qGuiApp->platformName() << "\n"; TestNativeQPA test;