refactor: Rename setting Settings::Core::UpdateUrl => Settings::Gui::UpdateCheckUrl

This commit is contained in:
Nick Bolton
2025-09-12 10:02:26 +01:00
parent 7682e17afe
commit e674d8b27c
5 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -309,7 +309,7 @@ bool showUpdateCheckOption(QWidget *parent)
"<p>Checking for updates requires an Internet connection.</p>"
"<p>URL: <pre>%2</pre></p>"
)
.arg(kAppName, Settings::value(Settings::Core::UpdateUrl).toString())
.arg(kAppName, Settings::value(Settings::Gui::UpdateCheckUrl).toString())
);
message.exec();

View File

@ -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());