mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make qPrefDisplay getters static and inline
Add static and inline to getter in all qPref header files Remove call to GET_PREFERENCE_* in qPrefDisplay.cpp static inline is slightly faster than a function call, but it saves a lot of coding lines (no lines in qPref*.cpp). Getters are a direct reference to struct preferences, so they will normally only be used from QML. Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
7f4123d0d1
commit
87d8963c78
2 changed files with 6 additions and 7 deletions
|
@ -26,7 +26,6 @@ void qPrefDisplay::loadSync(bool doSync)
|
|||
disk_theme(doSync);
|
||||
}
|
||||
|
||||
GET_PREFERENCE_TXT(Display, divelist_font);
|
||||
void qPrefDisplay::set_divelist_font(const QString& value)
|
||||
{
|
||||
QString newValue = value;
|
||||
|
@ -50,7 +49,6 @@ void qPrefDisplay::disk_divelist_font(bool doSync)
|
|||
setCorrectFont();
|
||||
}
|
||||
|
||||
GET_PREFERENCE_DOUBLE(Display, font_size);
|
||||
void qPrefDisplay::set_font_size(double value)
|
||||
{
|
||||
if (value != prefs.font_size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue