mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01: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 {
|
ToolButton {
|
||||||
id: miConfig
|
id: miConfig
|
||||||
Layout.alignment: Qt.AlignVCenter
|
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.width: root.iconWidth
|
||||||
icon.height: root.iconHeight
|
icon.height: root.iconHeight
|
||||||
onClicked: App.util.setToggleWallpaperConfiguration()
|
onClicked: App.util.setToggleWallpaperConfiguration()
|
||||||
|
@ -74,6 +74,20 @@ App::App()
|
|||||||
QGuiApplication::setApplicationName("ScreenPlay");
|
QGuiApplication::setApplicationName("ScreenPlay");
|
||||||
QGuiApplication::setApplicationVersion(QString(SCREENPLAY_VERSION));
|
QGuiApplication::setApplicationVersion(QString(SCREENPLAY_VERSION));
|
||||||
QGuiApplication::setQuitOnLastWindowClosed(false);
|
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/";
|
QString fontsPath = QGuiApplication::instance()->applicationDirPath() + "/assets/fonts/";
|
||||||
#if defined(Q_OS_MACOS)
|
#if defined(Q_OS_MACOS)
|
||||||
@ -122,20 +136,6 @@ App::App()
|
|||||||
"SearchType",
|
"SearchType",
|
||||||
"Error: only enums");
|
"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;
|
using std::make_shared, std::make_unique;
|
||||||
|
|
||||||
m_globalVariables = make_shared<GlobalVariables>();
|
m_globalVariables = make_shared<GlobalVariables>();
|
||||||
|
Loading…
Reference in New Issue
Block a user