summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlprefs.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-06-12 10:29:40 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-15 14:12:14 -0700
commitd0e9f626245e7833847ad25ae3b97c5ab87caccb (patch)
treeac760a0ae3134613db39b20dd2276dc52c2d8052 /mobile-widgets/qmlprefs.cpp
parent54db1309a0896aa3615956e20a89bb71053a683f (diff)
downloadsubsurface-d0e9f626245e7833847ad25ae3b97c5ab87caccb.tar.gz
mobile: add qmlprefs class
add class to cmake and pro register class Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qmlprefs.cpp')
-rw-r--r--mobile-widgets/qmlprefs.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/mobile-widgets/qmlprefs.cpp b/mobile-widgets/qmlprefs.cpp
new file mode 100644
index 000000000..49a788708
--- /dev/null
+++ b/mobile-widgets/qmlprefs.cpp
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "qmlprefs.h"
+
+QMLPrefs *QMLPrefs::m_instance = NULL;
+
+
+QMLPrefs::QMLPrefs()
+{
+ if (!m_instance)
+ m_instance = this;
+}
+
+QMLPrefs::~QMLPrefs()
+{
+ m_instance = NULL;
+}
+
+QMLPrefs *QMLPrefs::instance()
+{
+ return m_instance;
+}