From 5048a695aa1085a7eb03263b95a466e28ff40ab0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 1 Jan 2021 12:55:47 -0800 Subject: 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 --- mobile-widgets/qmlmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mobile-widgets') 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()); -- cgit v1.2.3-70-g09d2