diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-09-08 10:27:30 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-09-08 16:33:03 +0300 |
commit | af1eff03c9e839914aab4109970c4a9f6fac8a99 (patch) | |
tree | ae11034560b0e1c270614077ffd8f0f7485c7381 /src/settings/settings.hpp | |
parent | Add RekonqWindow tests (diff) | |
download | rekonq-af1eff03c9e839914aab4109970c4a9f6fac8a99.tar.xz |
RekonqSettings: add resetValue and remove value's defaultValue parameter
- generate default rekonqrc and include it in libsettings
- Settings uses :/settings/rekonqrc to provide default values
- Add Settings::path() to get the default settings location
Diffstat (limited to 'src/settings/settings.hpp')
-rw-r--r-- | src/settings/settings.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/settings/settings.hpp b/src/settings/settings.hpp index 713ce38d..8d413985 100644 --- a/src/settings/settings.hpp +++ b/src/settings/settings.hpp @@ -12,22 +12,28 @@ #include <rsettings.hpp> class QSettings; -class Settings final : public RekonqSettings { +class Settings : public RekonqSettings { Q_OBJECT public: + [[nodiscard]] static QString path(); + explicit Settings(const QString &settingsPath, QObject *parent = nullptr); - ~Settings() override = default; + ~Settings() override; void beginGroup(const QString &prefix) override; void endGroup() override; void setValue(const QString &key, const QVariant &value) override; - [[nodiscard]] QVariant value(const QString &key, const QVariant &defaultValue = QVariant()) const override; + void resetValue(const QString &key) override; + [[nodiscard]] QVariant value(const QString &key) const override; [[nodiscard]] QString filePath() const override; +protected: + QSettings *d; + QSettings *b; + private: Q_DISABLE_COPY_MOVE(Settings) - QSettings *d; }; |