diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-01-01 12:55:47 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-02 12:47:15 -0800 |
commit | 5048a695aa1085a7eb03263b95a466e28ff40ab0 (patch) | |
tree | 0e3e25bba85e87af6a8fb60977ab02d1064021ee /mobile-widgets/qmlmanager.cpp | |
parent | 53b572f98791146e1755a7bbb5f22f2e521eea8f (diff) | |
download | subsurface-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.cpp | 3 |
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()); |