From bd45d6a4065d24cde79a3114d6a3a29e7da47ae5 Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Mon, 8 Apr 2024 18:14:43 -0400 Subject: [PATCH] misc: fix argument warning for non-debug builds The `test` option is not used in non-debug builds. Change-Id: I25eef5b414f987ae4acc435213173f8c78390866 --- src/app/mainapplication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp index cd73bf289..64a2bd81a 100644 --- a/src/app/mainapplication.cpp +++ b/src/app/mainapplication.cpp @@ -425,7 +425,8 @@ MainApplication::initQmlLayer() &screenInfo_, this); - QUrl url; + QUrl url = u"qrc:/MainApplicationWindow.qml"_qs; +#ifdef QT_DEBUG if (parser_.isSet("test")) { // List the QML files in the project source tree. const auto targetTestComponent = findResource(parser_.value("test")); @@ -439,9 +440,8 @@ MainApplication::initQmlLayer() engine_->rootContext()->setContextProperty("testWidth", testWidth); engine_->rootContext()->setContextProperty("testHeight", testHeight); url = u"qrc:/ComponentTestWindow.qml"_qs; - } else { - url = u"qrc:/MainApplicationWindow.qml"_qs; } +#endif QObject::connect( engine_.get(), &QQmlApplicationEngine::objectCreationFailed, -- GitLab