mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make qPref.* use static
Prepare qPref.* to run load/sync Make variables and methods static to give easy access Make getter inline to give faster access Signed-off-by: Jan Iversen <jani@apache.org>:wq
This commit is contained in:
parent
253d868328
commit
0825f644e0
3 changed files with 13 additions and 18 deletions
|
|
@ -1,8 +1,9 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#ifndef QPREF_H
|
||||
#define QPREF_H
|
||||
|
||||
#include "core/pref.h"
|
||||
#include "ssrf-version.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "qPrefAnimations.h"
|
||||
|
|
@ -32,9 +33,8 @@ public:
|
|||
static qPref *instance();
|
||||
|
||||
// Load/Sync local settings (disk) and struct preference
|
||||
void loadSync(bool doSync);
|
||||
void load() { loadSync(false); }
|
||||
void sync() { loadSync(true); }
|
||||
static void load() { loadSync(false); }
|
||||
static void sync() { loadSync(true); }
|
||||
|
||||
public:
|
||||
enum cloud_status {
|
||||
|
|
@ -45,8 +45,11 @@ public:
|
|||
CS_NOCLOUD
|
||||
};
|
||||
|
||||
const QString canonical_version() const;
|
||||
const QString mobile_version() const;
|
||||
static const QString canonical_version() { return QString(CANONICAL_VERSION_STRING); }
|
||||
static const QString mobile_version() { return QString(MOBILE_VERSION_STRING); }
|
||||
|
||||
private:
|
||||
static void loadSync(bool doSync);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue