Skip to content

Commit

Permalink
Remove ConfigFile().macFileProviderModuleEnabled() config flag
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
claucambra committed Sep 6, 2023
1 parent 5c08b92 commit d008f22
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
7 changes: 0 additions & 7 deletions src/gui/macOS/fileprovider_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
Expand All @@ -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) {
Expand Down
14 changes: 0 additions & 14 deletions src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
}

}
3 changes: 0 additions & 3 deletions src/libsync/configfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d008f22

Please sign in to comment.