diff options
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/gpslocation.cpp | 2 | ||||
-rw-r--r-- | qt-mobile/gpslocation.h | 1 | ||||
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 5 |
3 files changed, 6 insertions, 2 deletions
diff --git a/qt-mobile/gpslocation.cpp b/qt-mobile/gpslocation.cpp index 0108fdc0d..fea313950 100644 --- a/qt-mobile/gpslocation.cpp +++ b/qt-mobile/gpslocation.cpp @@ -5,7 +5,7 @@ GpsLocation::GpsLocation(QObject *parent) { - QGeoPositionInfoSource *gpsSource = QGeoPositionInfoSource::createDefaultSource(parent); + gpsSource = QGeoPositionInfoSource::createDefaultSource(parent); if (gpsSource != 0) { QString msg = QString("have position source %1").arg(gpsSource->sourceName()); connect(gpsSource, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(newPosition(QGeoPositionInfo))); diff --git a/qt-mobile/gpslocation.h b/qt-mobile/gpslocation.h index e87198bc1..a21372080 100644 --- a/qt-mobile/gpslocation.h +++ b/qt-mobile/gpslocation.h @@ -14,6 +14,7 @@ public: private: QGeoPositionInfo lastPos; + QGeoPositionInfoSource *gpsSource; void status(QString msg); signals: diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index e0c621542..3459175f2 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -17,7 +17,10 @@ void qmlUiShowMessage(const char *errorString) QMLManager::QMLManager() { - //Initialize cloud credentials. + // create location manager service + locationProvider = new GpsLocation(this); + + // Initialize cloud credentials. setCloudUserName(prefs.cloud_storage_email); setCloudPassword(prefs.cloud_storage_password); setSaveCloudPassword(prefs.save_password_local); |