summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlinterface.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-01-31 09:42:09 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2020-01-31 21:28:45 +0100
commit3b42de66dc469e8783df2a3ea08e90b310821668 (patch)
treed3b585d3f3d60dddf324a4b9d8512847318e3075 /mobile-widgets/qmlinterface.h
parent188e513761fb07587b09f90c2d3f043da8870cc9 (diff)
downloadsubsurface-3b42de66dc469e8783df2a3ea08e90b310821668.tar.gz
Cleanup: remove QMLInterface::instance()
QMLInterface::instance() is only used in one single place. This makes the whole notion of having a global instance of the object moot, isn't it? Simply make the object static to the function that uses it, which guarantees that the object will be created when the function is called. I.e. the same behavior is retained with less complexity. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlinterface.h')
-rw-r--r--mobile-widgets/qmlinterface.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/mobile-widgets/qmlinterface.h b/mobile-widgets/qmlinterface.h
index 3c6022daa..1aced7a9d 100644
--- a/mobile-widgets/qmlinterface.h
+++ b/mobile-widgets/qmlinterface.h
@@ -81,9 +81,7 @@ class QMLInterface : public QObject {
Q_PROPERTY(QStringList diveSummaryText READ diveSummaryText NOTIFY diveSummaryTextChanged);
public:
- static QMLInterface *instance();
-
- // function to do the needed setup and do connect of signal/signal
+ // function to do the needed setup
static void setup(QQmlContext *ct);
// Duplicated enums, these enums are properly defined in the C/C++ structure