aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-06-12 12:22:48 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-06-12 13:39:47 +0200
commit2ff0aa09e35eb6910ef0a030ea41f84a1ed95782 (patch)
treee9e552ffe08c3655e91a1cf283fa35f4f0965f25 /launcher/Application.cpp
parent32217a774f9902d3d523e7b7985bbe22060d0451 (diff)
downloadPrismLauncher-2ff0aa09e35eb6910ef0a030ea41f84a1ed95782.tar.gz
PrismLauncher-2ff0aa09e35eb6910ef0a030ea41f84a1ed95782.tar.bz2
PrismLauncher-2ff0aa09e35eb6910ef0a030ea41f84a1ed95782.zip
fix: remove updater if it is not used
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 4e0393c0..ab3110a3 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -154,6 +154,7 @@ void appDebugOutput(QtMsgType type, const QMessageLogContext &context, const QSt
fflush(stderr);
}
+#ifdef LAUNCHER_WITH_UPDATER
QString getIdealPlatform(QString currentPlatform) {
auto info = Sys::getKernelInfo();
switch(info.kernelType) {
@@ -192,6 +193,7 @@ QString getIdealPlatform(QString currentPlatform) {
}
return currentPlatform;
}
+#endif
}
@@ -754,6 +756,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
qDebug() << "<> Translations loaded.";
}
+#ifdef LAUNCHER_WITH_UPDATER
// initialize the updater
if(BuildConfig.UPDATER_ENABLED)
{
@@ -763,6 +766,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_updateChecker.reset(new UpdateChecker(m_network, channelUrl, BuildConfig.VERSION_CHANNEL, BuildConfig.VERSION_BUILD));
qDebug() << "<> Updater started.";
}
+#endif
// Instance icons
{
@@ -1408,7 +1412,9 @@ MainWindow* Application::showMainWindow(bool minimized)
}
m_mainWindow->checkInstancePathForProblems();
+#ifdef LAUNCHER_WITH_UPDATER
connect(this, &Application::updateAllowedChanged, m_mainWindow, &MainWindow::updatesAllowedChanged);
+#endif
connect(m_mainWindow, &MainWindow::isClosing, this, &Application::on_windowClose);
m_openWindows++;
}