core: update qPrefDisplay to new consensus

add inline to load/sync
remove const from QString getters

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-07-24 18:25:18 +02:00 committed by Dirk Hohndel
parent 8cfe048150
commit 98820cf970

View file

@ -19,15 +19,15 @@ public:
// Load/Sync local settings (disk) and struct preference // Load/Sync local settings (disk) and struct preference
void loadSync(bool doSync); void loadSync(bool doSync);
void load() { loadSync(false); } void inline load() { loadSync(false); }
void sync() { loadSync(true); } void inline sync() { loadSync(true); }
public: public:
static inline const QString divelist_font() {return QString(prefs.divelist_font); }; static inline QString divelist_font() {return prefs.divelist_font; };
static inline double font_size() {return prefs.font_size; }; static inline double font_size() {return prefs.font_size; };
static inline bool display_invalid_dives() {return prefs.display_invalid_dives; }; static inline bool display_invalid_dives() {return prefs.display_invalid_dives; };
static inline bool show_developer() {return prefs.show_developer; }; static inline bool show_developer() {return prefs.show_developer; };
static inline const QString theme() {return QString(prefs.theme); }; static inline QString theme() {return prefs.theme; };
public slots: public slots:
void set_divelist_font(const QString& value); void set_divelist_font(const QString& value);