From d008f2202169d58dc72b981a1aeb2a70e89463d0 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 6 Sep 2023 15:40:19 +0800 Subject: [PATCH] Remove ConfigFile().macFileProviderModuleEnabled() config flag Since we are going to distribute the file provider client as separate from the normal client, this flag doesn't make any practical sense. The user using the FileProvider desktop client will not want to not use the file provider module Signed-off-by: Claudio Cambra --- src/gui/macOS/fileprovider_mac.mm | 7 ------- src/libsync/configfile.cpp | 14 -------------- src/libsync/configfile.h | 3 --- 3 files changed, 24 deletions(-) diff --git a/src/gui/macOS/fileprovider_mac.mm b/src/gui/macOS/fileprovider_mac.mm index 56db4d2447b07..29735b00c50e2 100644 --- a/src/gui/macOS/fileprovider_mac.mm +++ b/src/gui/macOS/fileprovider_mac.mm @@ -37,10 +37,6 @@ qCInfo(lcMacFileProvider) << "File provider system is not available on this version of macOS."; deleteLater(); return; - } else if (!ConfigFile().macFileProviderModuleEnabled()) { - qCInfo(lcMacFileProvider) << "File provider module is not enabled in application config."; - deleteLater(); - return; } qCInfo(lcMacFileProvider) << "Initialising file provider domain manager."; @@ -63,9 +59,6 @@ if (!fileProviderAvailable()) { qCInfo(lcMacFileProvider) << "File provider system is not available on this version of macOS."; return nullptr; - } else if (!ConfigFile().macFileProviderModuleEnabled()) { - qCInfo(lcMacFileProvider) << "File provider module is not enabled in application config."; - return nullptr; } if (!_instance) { diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index 5931929d559d5..7b7df46a953f5 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -108,8 +108,6 @@ static constexpr char certPath[] = "http_certificatePath"; static constexpr char certPasswd[] = "http_certificatePasswd"; static const QSet validUpdateChannels { QStringLiteral("stable"), QStringLiteral("beta") }; - -static constexpr auto macFileProviderModuleEnabledC = "macFileProviderModuleEnabled"; } namespace OCC { @@ -1195,16 +1193,4 @@ void ConfigFile::setDiscoveredLegacyConfigPath(const QString &discoveredLegacyCo _discoveredLegacyConfigPath = discoveredLegacyConfigPath; } -bool ConfigFile::macFileProviderModuleEnabled() const -{ - QSettings settings(configFile(), QSettings::IniFormat); - return settings.value(macFileProviderModuleEnabledC, false).toBool(); -} - -void ConfigFile::setMacFileProviderModuleEnabled(const bool moduleEnabled) -{ - QSettings settings(configFile(), QSettings::IniFormat); - settings.setValue(QLatin1String(macFileProviderModuleEnabledC), moduleEnabled); -} - } diff --git a/src/libsync/configfile.h b/src/libsync/configfile.h index 6906c21b7600a..e819dfec10944 100644 --- a/src/libsync/configfile.h +++ b/src/libsync/configfile.h @@ -227,9 +227,6 @@ class OWNCLOUDSYNC_EXPORT ConfigFile [[nodiscard]] static QString discoveredLegacyConfigPath(); static void setDiscoveredLegacyConfigPath(const QString &discoveredLegacyConfigPath); - [[nodiscard]] bool macFileProviderModuleEnabled() const; - void setMacFileProviderModuleEnabled(const bool moduleEnabled); - protected: [[nodiscard]] QVariant getPolicySetting(const QString &policy, const QVariant &defaultValue = QVariant()) const; void storeData(const QString &group, const QString &key, const QVariant &value);