Skip to content

Commit

Permalink
test: Fix tests with UBSAN
Browse files Browse the repository at this point in the history
QtQuick tests have only qGuiApp, not qApp
  • Loading branch information
iamsergio committed Apr 30, 2024
1 parent 12e573c commit 616bc37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/tst_native_qpa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 616bc37

Please sign in to comment.