aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authorKenneth Chew <kenneth.c0@protonmail.com>2022-04-20 22:34:13 -0400
committerKenneth Chew <kenneth.c0@protonmail.com>2022-05-19 15:16:37 -0400
commitb5bdfa6c2e9a0eb62e476dd399b82bfa972e0320 (patch)
tree324b777374db033d5bc838ba931ca8cc5d4e93db /launcher/ui
parentea4ef1655bdadf04c36768f0f641ca7579f754cf (diff)
downloadPrismLauncher-b5bdfa6c2e9a0eb62e476dd399b82bfa972e0320.tar.gz
PrismLauncher-b5bdfa6c2e9a0eb62e476dd399b82bfa972e0320.tar.bz2
PrismLauncher-b5bdfa6c2e9a0eb62e476dd399b82bfa972e0320.zip
Implement automatic and manual updates on macOS
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/MainWindow.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index f016dc76..12761da1 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -283,7 +283,7 @@ public:
updateLaunchAction();
}
- void createMainToolbarActions(QMainWindow *MainWindow)
+ void createMainToolbarActions(MainWindow *MainWindow)
{
actionAddInstance = TranslatedAction(MainWindow);
actionAddInstance->setObjectName(QStringLiteral("actionAddInstance"));
@@ -1027,6 +1027,13 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
{
updater->checkForUpdate(APPLICATION->settings()->get("UpdateChannel").toString(), false);
}
+
+#ifdef Q_OS_MAC
+ connect(APPLICATION->updateChecker()->getSparkleUpdater(),
+ &SparkleUpdater::canCheckForUpdatesChanged,
+ this,
+ &MainWindow::updatesAllowedChanged);
+#endif
}
setSelectedInstanceById(APPLICATION->settings()->get("SelectedInstance").toString());