mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: remove QSettings in qPref* and use a shared variable
Add qPrefPrivate class which contains one QSettings variable, delete QSettings from qPref* class definitions this secures there are only instance of QSettings (QSettings needs to be in a QObject class to work) Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
c0e9e978a1
commit
3c3729711c
9 changed files with 46 additions and 25 deletions
|
|
@ -3,7 +3,6 @@
|
|||
#define QPREFDISPLAY_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
|
||||
class qPrefDisplay : public QObject {
|
||||
Q_OBJECT
|
||||
|
|
@ -44,9 +43,6 @@ signals:
|
|||
void theme_changed(const QString& value);
|
||||
|
||||
private:
|
||||
const QString group = QStringLiteral("Display");
|
||||
QSettings setting;
|
||||
|
||||
// functions to load/sync variable with disk
|
||||
void disk_divelist_font(bool doSync);
|
||||
void disk_font_size(bool doSync);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue