diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2021-11-15 15:23:13 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-11-16 17:52:38 +0300 |
commit | aa32490df5e2ff7d57c9070556d0ab1d8acc62f3 (patch) | |
tree | c69b66d86f461b033b208e07d0636a17e94e3267 /src/gui/folderman.cpp | |
parent | 3e64237c7d8d17c54c09091c08e17cb10e7fb1ca (diff) |
Add branding option to disable multiple db warning
Diffstat (limited to 'src/gui/folderman.cpp')
-rw-r--r-- | src/gui/folderman.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index e5e587d43..f92eb643f 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -1535,10 +1535,17 @@ Result<void, QString> FolderMan::unsupportedConfiguration(const QString &path) c if (it == _unsupportedConfigurationError.end()) { it = _unsupportedConfigurationError.insert(path, [&]() -> Result<void, QString> { if (numberOfSyncJournals(path) > 1) { - return tr("Multiple accounts are sharing the folder %1.\n" - "This configuration is know to lead to dataloss and is no longer supported.\n" - "Please consider removing this folder from the account and adding it again.") - .arg(path); + const QString error = tr("Multiple accounts are sharing the folder %1.\n" + "This configuration is know to lead to dataloss and is no longer supported.\n" + "Please consider removing this folder from the account and adding it again.") + .arg(path); + if (Theme::instance()->warnOnMultipleDb()) { + qCWarning(lcFolderMan) << error; + return error; + } else { + qCWarning(lcFolderMan) << error << "this error is not displayed to the user as this is a branded" + << "client and the error itself might be a false positive caused by a previous broken migration"; + } } return {}; }()); |