diff --git a/doc/user/configuration.md b/doc/user/configuration.md index d175be43f..ebbe0896e 100644 --- a/doc/user/configuration.md +++ b/doc/user/configuration.md @@ -73,7 +73,6 @@ This section contains general options it will begin with `[core]` | preventSleep | `true` or `false` | Prevent sleep when Deskflow is active [default: false] | | processMode | `1` or `0` | The mode we use to start the process Service or Desktop | | screenName | string | Name used to identify the screen [default: machine's hostname] | -| updateUrl | URL | The URL to use when checking for a new version number, it should return a version [default: https://api.deskflow.org/version]| | useHooks | `true` or `false` | If Windows uses hooks or not [default: true] | | language | 639 language | The language to display the GUI in [default: en] | | wlClipboard | `true` or `false` | When true the wl-clipboard backend will be enabled [default: false] | @@ -106,6 +105,7 @@ This section contains options used by the GUI it will begin with `[gui]` | shownFirstConnectedMessage | `true` or `false` | When `true` GUI has shown the user the message for connecting the first time [default: false] | | shownServerFirstStartMessage | `true` or `false` | When `true` GUI has shown the user the Deskflow server is now running message [default: false] | | startCoreWithGui | `true` or `false` | When true the Core will be started with the GUI. It is set to the Core's state on exit. | +| updateCheckUrl | URL | The URL to use when checking for a new version number, it should return a version [default: https://api.deskflow.org/version]| ### Log diff --git a/src/lib/common/Settings.cpp b/src/lib/common/Settings.cpp index 3c64d213f..c32f3e44b 100644 --- a/src/lib/common/Settings.cpp +++ b/src/lib/common/Settings.cpp @@ -170,7 +170,7 @@ QVariant Settings::defaultValue(const QString &key) if (key == Daemon::Elevate) return !Settings::isPortableMode(); - if (key == Core::UpdateUrl) + if (key == Gui::UpdateCheckUrl) return kUrlUpdateCheck; if (key == Server::ExternalConfigFile) diff --git a/src/lib/common/Settings.h b/src/lib/common/Settings.h index ad68f3972..215ab9be8 100644 --- a/src/lib/common/Settings.h +++ b/src/lib/common/Settings.h @@ -49,7 +49,6 @@ public: inline static const auto PreventSleep = QStringLiteral("core/preventSleep"); inline static const auto ProcessMode = QStringLiteral("core/processMode"); inline static const auto ScreenName = QStringLiteral("core/screenName"); - inline static const auto UpdateUrl = QStringLiteral("core/updateUrl"); inline static const auto Display = QStringLiteral("core/display"); inline static const auto UseHooks = QStringLiteral("core/useHooks"); inline static const auto Language = QStringLiteral("core/language"); @@ -67,6 +66,7 @@ public: inline static const auto Autohide = QStringLiteral("gui/autoHide"); inline static const auto AutoStartCore = QStringLiteral("gui/startCoreWithGui"); inline static const auto AutoUpdateCheck = QStringLiteral("gui/enableUpdateCheck"); + inline static const auto UpdateCheckUrl = QStringLiteral("gui/updateCheckUrl"); inline static const auto CloseReminder = QStringLiteral("gui/closeReminder"); inline static const auto CloseToTray = QStringLiteral("gui/closeToTray"); inline static const auto LogExpanded = QStringLiteral("gui/logExpanded"); @@ -192,7 +192,6 @@ private: , Settings::Core::PreventSleep , Settings::Core::ProcessMode , Settings::Core::ScreenName - , Settings::Core::UpdateUrl , Settings::Core::Display , Settings::Core::UseHooks , Settings::Core::UseWlClipboard @@ -207,6 +206,7 @@ private: , Settings::Gui::Autohide , Settings::Gui::AutoStartCore , Settings::Gui::AutoUpdateCheck + , Settings::Gui::UpdateCheckUrl , Settings::Gui::CloseReminder , Settings::Gui::CloseToTray , Settings::Gui::LogExpanded diff --git a/src/lib/gui/Messages.cpp b/src/lib/gui/Messages.cpp index fb640e7ce..ca396f3f3 100644 --- a/src/lib/gui/Messages.cpp +++ b/src/lib/gui/Messages.cpp @@ -309,7 +309,7 @@ bool showUpdateCheckOption(QWidget *parent) "

Checking for updates requires an Internet connection.

" "

URL:

%2

" ) - .arg(kAppName, Settings::value(Settings::Core::UpdateUrl).toString()) + .arg(kAppName, Settings::value(Settings::Gui::UpdateCheckUrl).toString()) ); message.exec(); diff --git a/src/lib/gui/VersionChecker.cpp b/src/lib/gui/VersionChecker.cpp index f2fa1dd82..807b902ed 100644 --- a/src/lib/gui/VersionChecker.cpp +++ b/src/lib/gui/VersionChecker.cpp @@ -24,7 +24,7 @@ VersionChecker::VersionChecker(QObject *parent) : QObject(parent), m_network{new void VersionChecker::checkLatest() const { - const QString url = Settings::value(Settings::Core::UpdateUrl).toString(); + const QString url = Settings::value(Settings::Gui::UpdateCheckUrl).toString(); qDebug("checking for updates at: %s", qPrintable(url)); auto request = QNetworkRequest(url); auto userAgent = QString("%1 %2 on %3").arg(kAppName, kVersion, QSysInfo::prettyProductName());