diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index fd8d938d643f..01ed91f0a3d8 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -99,6 +99,7 @@ static constexpr char downloadLimitC[] = "BWLimit/downloadLimit"; static constexpr char newBigFolderSizeLimitC[] = "newBigFolderSizeLimit"; static constexpr char useNewBigFolderSizeLimitC[] = "useNewBigFolderSizeLimit"; +static constexpr char notifyExistingFoldersOverLimitC[] = "notifyExistingFoldersOverLimit"; static constexpr char confirmExternalStorageC[] = "confirmExternalStorage"; static constexpr char moveToTrashC[] = "moveToTrash"; @@ -959,6 +960,17 @@ bool ConfigFile::useNewBigFolderSizeLimit() const return getPolicySetting(QLatin1String(useNewBigFolderSizeLimitC), fallback).toBool(); } +bool ConfigFile::notifyExistingFoldersOverLimit() const +{ + const auto fallback = getValue(notifyExistingFoldersOverLimitC, {}, true); + return getPolicySetting(QString(notifyExistingFoldersOverLimitC), fallback).toBool(); +} + +void ConfigFile::setNotifyExistingFoldersOverLimit(const bool notify) +{ + setValue(notifyExistingFoldersOverLimitC, notify); +} + void ConfigFile::setConfirmExternalStorage(bool isChecked) { setValue(confirmExternalStorageC, isChecked); diff --git a/src/libsync/configfile.h b/src/libsync/configfile.h index 5d0ee5460fce..a947fec2bd6e 100644 --- a/src/libsync/configfile.h +++ b/src/libsync/configfile.h @@ -141,6 +141,8 @@ class OWNCLOUDSYNC_EXPORT ConfigFile /** [checked, size in MB] **/ [[nodiscard]] QPair newBigFolderSizeLimit() const; void setNewBigFolderSizeLimit(bool isChecked, qint64 mbytes); + [[nodiscard]] bool notifyExistingFoldersOverLimit() const; + void setNotifyExistingFoldersOverLimit(const bool notify); [[nodiscard]] bool useNewBigFolderSizeLimit() const; [[nodiscard]] bool confirmExternalStorage() const; void setConfirmExternalStorage(bool);