mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-15 06:52:34 +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:
parent
c1003343e7
commit
dd01baa459
@ -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()
|
||||
|
@ -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>();
|
||||
|
Loading…
Reference in New Issue
Block a user