aboutsummaryrefslogtreecommitdiffstats
path: root/src/settings_interface.h
diff options
context:
space:
mode:
authorConfuSomu2023-08-15 20:16:44 -0400
committerConfuSomu2023-08-15 20:16:44 -0400
commit5066f9908772d1838d73834eb5bcb6f8f7858fe1 (patch)
treea8abe11ccfb96033171985fcce6e6f86b8699dd9 /src/settings_interface.h
parentdef9f251739e9a0d6d0ff1c98dc4562dade3e9ef (diff)
downloadActorViewer-5066f9908772d1838d73834eb5bcb6f8f7858fe1.tar
ActorViewer-5066f9908772d1838d73834eb5bcb6f8f7858fe1.tar.gz
ActorViewer-5066f9908772d1838d73834eb5bcb6f8f7858fe1.zip
Create convinence method for reading settings
This method avoids having to create a SettingsInterface object that will be only used to read a small number of settings before being destroyed. It creates a static object that persists between invocations. Through the use of QSettings for reading a value, we are assured of always reading the most up to date version of settings as this class guaranties that changes done to one QSettings object will be immediately visible in other QSettings objects.
Diffstat (limited to 'src/settings_interface.h')
-rw-r--r--src/settings_interface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/settings_interface.h b/src/settings_interface.h
index e3935d0..fa9386c 100644
--- a/src/settings_interface.h
+++ b/src/settings_interface.h
@@ -28,6 +28,7 @@ class SettingsInterface {
public:
~SettingsInterface();
const QVariant read_setting(const QString &key);
+ static const QVariant quick_read_setting(const QString &key);
void write_setting(const QString &key, const QVariant &value);
void clear_setting(const QString &key);
void clear_all();