From dd01baa459b99b1570388dfd31c0e41b99786a86 Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Wed, 29 Nov 2023 10:56:16 +0100 Subject: [PATCH] Change init to only init most systems... after we make sure that this is the only ScreenPlay instance --- ScreenPlay/qml/Navigation/Navigation.qml | 2 +- ScreenPlay/src/app.cpp | 28 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ScreenPlay/qml/Navigation/Navigation.qml b/ScreenPlay/qml/Navigation/Navigation.qml index 42bacd6b..7d80f5f1 100644 --- a/ScreenPlay/qml/Navigation/Navigation.qml +++ b/ScreenPlay/qml/Navigation/Navigation.qml @@ -265,7 +265,7 @@ Rectangle { ToolButton { id: miConfig Layout.alignment: Qt.AlignVCenter - icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_video_settings_black_24dp.svg" + icon.source: "qrc:/qml/ScreenPlayApp/assets/icons/icon_video_settings.svg" icon.width: root.iconWidth icon.height: root.iconHeight onClicked: App.util.setToggleWallpaperConfiguration() diff --git a/ScreenPlay/src/app.cpp b/ScreenPlay/src/app.cpp index 3bd9cde9..76836894 100644 --- a/ScreenPlay/src/app.cpp +++ b/ScreenPlay/src/app.cpp @@ -74,6 +74,20 @@ App::App() QGuiApplication::setApplicationName("ScreenPlay"); QGuiApplication::setApplicationVersion(QString(SCREENPLAY_VERSION)); QGuiApplication::setQuitOnLastWindowClosed(false); + // ScreenPlayManager first to check if another ScreenPlay Instace is running + m_screenPlayManager = std::make_unique(); + m_isAnotherScreenPlayInstanceRunning = m_screenPlayManager->isAnotherScreenPlayInstanceRunning(); +} + +/*! + \brief Used for initialization after the constructor. The sole purpose is to check if + another ScreenPlay instance is running and then quit early. This is also because we cannot + call QGuiApplication::quit(); in the SDKConnector before the app.exec(); ( the Qt main event + loop ) has started. +*/ +void App::init() +{ + qInfo() << "Init ScreenPlay"; QString fontsPath = QGuiApplication::instance()->applicationDirPath() + "/assets/fonts/"; #if defined(Q_OS_MACOS) @@ -122,20 +136,6 @@ App::App() "SearchType", "Error: only enums"); - // ScreenPlayManager first to check if another ScreenPlay Instace is running - m_screenPlayManager = std::make_unique(); - m_isAnotherScreenPlayInstanceRunning = m_screenPlayManager->isAnotherScreenPlayInstanceRunning(); -} - -/*! - \brief Used for initialization after the constructor. The sole purpose is to check if - another ScreenPlay instance is running and then quit early. This is also because we cannot - call QGuiApplication::quit(); in the SDKConnector before the app.exec(); ( the Qt main event - loop ) has started. -*/ -void App::init() -{ - using std::make_shared, std::make_unique; m_globalVariables = make_shared();