Add functionality to (Sparkle) updater settings on macOS
Also remove a debug line I accidentally left in
This commit is contained in:
parent
f9f46609ee
commit
34adcec616
@ -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();
|
||||
|
@ -54,7 +54,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoUpdateCheckBox">
|
||||
<property name="text">
|
||||
<string>Check for updates on start?</string>
|
||||
<string>Check for updates automatically</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -173,7 +173,6 @@ void SparkleUpdater::setAllowedChannel(const QString &channel)
|
||||
|
||||
NSSet<NSString *> *nsChannels = [NSSet setWithObject:channel.toNSString()];
|
||||
priv->updaterDelegate.allowedChannels = nsChannels;
|
||||
qDebug() << channel;
|
||||
APPLICATION->settings()->set("UpdateChannel", channel);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user