2017-11-18 18:30:22 +01:00
|
|
|
This patch is taken from Debian and modified slightly
|
|
|
|
|
|
|
|
Description: Phoning-home version checks should be disabled in Debian packages
|
|
|
|
Author: Sandro Knauß <bugs@ssandroknauss.de>
|
|
|
|
Origin: debian
|
|
|
|
Bug-debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=721341
|
|
|
|
Forwarded: not-needed
|
|
|
|
Last-Update: 2014-02-17
|
|
|
|
---
|
|
|
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|
|
|
--- a/src/libsync/configfile.cpp
|
|
|
|
+++ b/src/libsync/configfile.cpp
|
2019-01-02 15:43:33 +01:00
|
|
|
@@ -522,11 +522,14 @@ bool ConfigFile::skipUpdateCheck(const Q
|
|
|
|
if (connection.isEmpty())
|
|
|
|
con = defaultConnection();
|
|
|
|
|
2017-11-18 18:30:22 +01:00
|
|
|
- QVariant fallback = getValue(QLatin1String(skipUpdateCheckC), con, false);
|
|
|
|
+ QVariant fallback = getValue(QLatin1String(skipUpdateCheckC), con, true);
|
|
|
|
fallback = getValue(QLatin1String(skipUpdateCheckC), QString(), fallback);
|
2019-01-02 15:43:33 +01:00
|
|
|
|
2017-11-18 18:30:22 +01:00
|
|
|
QVariant value = getPolicySetting(QLatin1String(skipUpdateCheckC), fallback);
|
|
|
|
- return value.toBool();
|
|
|
|
+ if ( !value.toBool() )
|
|
|
|
+ qDebug() << "Guix has disabled the UpdateCheck mechanism.";
|
|
|
|
+
|
|
|
|
+ return true;
|
|
|
|
}
|
2019-01-02 15:43:33 +01:00
|
|
|
|
|
|
|
void ConfigFile::setSkipUpdateCheck(bool skip, const QString &connection)
|
2017-11-18 18:30:22 +01:00
|
|
|
--- a/src/gui/generalsettings.cpp
|
|
|
|
+++ b/src/gui/generalsettings.cpp
|
2019-01-02 15:43:33 +01:00
|
|
|
@@ -146,6 +149,7 @@ void GeneralSettings::loadMiscSettings()
|
|
|
|
|
2017-11-18 18:30:22 +01:00
|
|
|
void GeneralSettings::slotUpdateInfo()
|
|
|
|
{
|
|
|
|
+ /* Guix doesn't want an autoupdater
|
2019-01-02 15:43:33 +01:00
|
|
|
if (ConfigFile().skipUpdateCheck() || !Updater::instance()) {
|
|
|
|
// updater disabled on compile
|
|
|
|
_ui->updaterWidget->setVisible(false);
|
|
|
|
@@ -174,6 +178,9 @@ void GeneralSettings::slotUpdateInfo()
|
|
|
|
_ui->updateChannel->setCurrentIndex(ConfigFile().updateChannel() == "beta" ? 1 : 0);
|
|
|
|
connect(_ui->updateChannel, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
|
|
|
this, &GeneralSettings::slotUpdateChannelChanged, Qt::UniqueConnection);
|
2017-11-18 18:30:22 +01:00
|
|
|
+ */
|
|
|
|
+ //hide the update group box for Guix.
|
2019-01-02 15:43:33 +01:00
|
|
|
+ _ui->updaterWidget->setVisible(false);
|
2017-11-18 18:30:22 +01:00
|
|
|
}
|
2019-01-02 15:43:33 +01:00
|
|
|
|
|
|
|
void GeneralSettings::slotUpdateChannelChanged(int index)
|