From 34adcec6165662d6245a55ee0a75c36753061df2 Mon Sep 17 00:00:00 2001 From: Kenneth Chew Date: Fri, 22 Apr 2022 22:29:00 -0400 Subject: Add functionality to (Sparkle) updater settings on macOS Also remove a debug line I accidentally left in --- launcher/ui/pages/global/LauncherPage.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'launcher/ui/pages/global/LauncherPage.cpp') diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index af2e2cd1..51284a8e 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -261,7 +261,11 @@ void LauncherPage::applySettings() auto s = APPLICATION->settings(); // Updates +#ifdef Q_OS_MAC + APPLICATION->updateChecker()->getSparkleUpdater()->setAutomaticallyChecksForUpdates(ui->autoUpdateCheckBox->isChecked()); +#else s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked()); +#endif s->set("UpdateChannel", m_currentUpdateChannel); auto original = s->get("IconTheme").toString(); //FIXME: make generic @@ -343,7 +347,11 @@ void LauncherPage::loadSettings() { auto s = APPLICATION->settings(); // Updates +#ifdef Q_OS_MAC + ui->autoUpdateCheckBox->setChecked(APPLICATION->updateChecker()->getSparkleUpdater()->getAutomaticallyChecksForUpdates()); +#else ui->autoUpdateCheckBox->setChecked(s->get("AutoUpdate").toBool()); +#endif m_currentUpdateChannel = s->get("UpdateChannel").toString(); //FIXME: make generic auto theme = s->get("IconTheme").toString(); -- cgit