diff options
Diffstat (limited to 'core/settings')
-rw-r--r-- | core/settings/qPref.cpp | 13 | ||||
-rw-r--r-- | core/settings/qPref.h | 5 |
2 files changed, 8 insertions, 10 deletions
diff --git a/core/settings/qPref.cpp b/core/settings/qPref.cpp index b703c1fcb..791ec44b8 100644 --- a/core/settings/qPref.cpp +++ b/core/settings/qPref.cpp @@ -2,17 +2,16 @@ #include "qPref_private.h" #include "qPref.h" - -qPref *qPref::m_instance = NULL; +qPref::qPref(QObject *parent) : + QObject(parent) +{ +} qPref *qPref::instance() { - if (!m_instance) - m_instance = new qPref; - return m_instance; +static qPref *self = new qPref; + return self; } - - void qPref::loadSync(bool doSync) { } diff --git a/core/settings/qPref.h b/core/settings/qPref.h index 4170e5e64..f312f328a 100644 --- a/core/settings/qPref.h +++ b/core/settings/qPref.h @@ -7,10 +7,10 @@ class qPref : public QObject { Q_OBJECT + Q_ENUMS(cloud_status); public: - qPref(QObject *parent = NULL) : QObject(parent) {}; - ~qPref() {}; + qPref(QObject *parent = NULL); static qPref *instance(); // Load/Sync local settings (disk) and struct preference @@ -19,7 +19,6 @@ public: public: private: - static qPref *m_instance; }; #endif |