1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-02 16:49:47 +02:00

Change init to only init most systems...

after we  make sure that this is the only
ScreenPlay instance
This commit is contained in:
Elias Steurer 2023-11-29 10:56:16 +01:00
parent c1003343e7
commit dd01baa459
2 changed files with 15 additions and 15 deletions

View File

@ -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()

View File

@ -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<ScreenPlayManager>();
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<ScreenPlayManager>();
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<GlobalVariables>();