summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlprefs.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-27 16:26:54 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-09-27 16:26:58 -0700
commit9ae7040a91c3e3e0606d7abe085ef6da47efd6d2 (patch)
treede120b115df95fb96d945581aca41cd8c760263c /mobile-widgets/qmlprefs.h
parent400b218f769320221567b7b66f39c33126a7d2e1 (diff)
downloadsubsurface-9ae7040a91c3e3e0606d7abe085ef6da47efd6d2.tar.gz
Revert the singleton PR
It turns out that this isn't working the way it was intended to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlprefs.h')
-rw-r--r--mobile-widgets/qmlprefs.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/mobile-widgets/qmlprefs.h b/mobile-widgets/qmlprefs.h
index 70964608b..99819fd7c 100644
--- a/mobile-widgets/qmlprefs.h
+++ b/mobile-widgets/qmlprefs.h
@@ -5,9 +5,9 @@
#include <QObject>
#include "core/settings/qPrefCloudStorage.h"
#include "core/settings/qPrefDisplay.h"
-#include "core/singleton.h"
-class QMLPrefs : public QObject, public SillySingleton<QMLPrefs> {
+
+class QMLPrefs : public QObject {
Q_OBJECT
Q_PROPERTY(QString cloudPassword
MEMBER m_cloudPassword
@@ -35,6 +35,9 @@ class QMLPrefs : public QObject, public SillySingleton<QMLPrefs> {
NOTIFY oldStatusChanged)
public:
QMLPrefs();
+ ~QMLPrefs();
+
+ static QMLPrefs *instance();
const QString cloudPassword() const;
void setCloudPassword(const QString &cloudPassword);
@@ -63,6 +66,7 @@ private:
QString m_cloudPin;
QString m_cloudUserName;
qPrefCloudStorage::cloud_status m_credentialStatus;
+ static QMLPrefs *m_instance;
qPrefCloudStorage::cloud_status m_oldStatus;
bool m_showPin;