Fix build without Sparkle.framework
authorChih-Hsuan Yen <yan12125@gmail.com>
Sat, 2 Jun 2018 12:58:33 +0000 (20:58 +0800)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 25 Nov 2020 08:40:20 +0000 (09:40 +0100)
(PR #6567)

src/gui/generalsettings.cpp

index 16658f8a34af52fc02883c9af13291bc18d8d4ba..2b37a205332c9a6171350629b9815d2e1e3f4f4e 100644 (file)
@@ -280,7 +280,7 @@ void GeneralSettings::slotUpdateInfo()
 
         _ui->autoCheckForUpdatesCheckBox->setChecked(ConfigFile().autoUpdateCheck());
     }
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && defined(HAVE_SPARKLE)
     else if (auto sparkleUpdater = qobject_cast<SparkleUpdater *>(Updater::instance())) {
         _ui->updateStateLabel->setText(sparkleUpdater->statusString());
         _ui->restartButton->setVisible(false);
@@ -324,7 +324,7 @@ void GeneralSettings::slotUpdateChannelChanged(const QString &channel)
                 updater->setUpdateUrl(Updater::updateUrl());
                 updater->checkForUpdate();
             }
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && defined(HAVE_SPARKLE)
             else if (auto updater = qobject_cast<SparkleUpdater *>(Updater::instance())) {
                 updater->setUpdateUrl(Updater::updateUrl());
                 updater->checkForUpdate();