summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-01 12:55:47 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-02 12:47:15 -0800
commit5048a695aa1085a7eb03263b95a466e28ff40ab0 (patch)
tree0e3e25bba85e87af6a8fb60977ab02d1064021ee /mobile-widgets/qmlmanager.cpp
parent53b572f98791146e1755a7bbb5f22f2e521eea8f (diff)
downloadsubsurface-5048a695aa1085a7eb03263b95a466e28ff40ab0.tar.gz
mobile: turn GpsLocation into a regular singleton construct
Simply move the initialization of the logging function into its own method and call that in the QMLManager constructor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 96fecff96..219b70ea7 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -290,7 +290,8 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
this, &QMLManager::btHostModeChange);
}
// create location manager service
- locationProvider = new GpsLocation(&appendTextToLogStandalone, this);
+ locationProvider = GpsLocation::instance();
+ locationProvider->setLogCallBack(&appendTextToLogStandalone);
progress_callback = &progressCallback;
connect(locationProvider, SIGNAL(haveSourceChanged()), this, SLOT(hasLocationSourceChanged()));
setLocationServiceAvailable(locationProvider->hasLocationsSource());