Add a thin layer around SettingsStorage class

This new layer would be handy for saving GUI widget states as they don't
need the value cached and they store/load rarely.
This commit is contained in:
Chocobo1
2020-12-28 23:32:59 +08:00
parent 60d65d8137
commit 0b0597be0c
12 changed files with 122 additions and 92 deletions

View File

@@ -31,7 +31,7 @@
#include <QObject>
#include <QString>
template <typename T> class CachedSettingValue;
template <typename T> class SettingValue;
/// Utility class to defer file deletion
class FileGuard
@@ -75,7 +75,7 @@ public:
private:
TorrentFileGuard(const QString &path, AutoDeleteMode mode);
static CachedSettingValue<AutoDeleteMode> &autoDeleteModeSetting();
static SettingValue<AutoDeleteMode> &autoDeleteModeSetting();
Q_ENUM(AutoDeleteMode)
AutoDeleteMode m_mode;