mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
53b572f987
commit
5048a695aa
3 changed files with 13 additions and 20 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue