Commit d733cca4 authored by Oliver Wolff's avatar Oliver Wolff
Browse files

winrt: Initialize status and position tokens' values in constructor


Doing their initialization near the end of init() is too late because
parts of init (namely setUpdateInterval and
setPreferredPositioningMethods) rely on them.

Change-Id: I81ea1db53aa531248f2c49b8f53f2c33b5fb954e
Reviewed-by: default avatarMiguel Costa <miguel.costa@qt.io>
parent 7bd6955f
No related merge requests found
Showing with 2 additions and 3 deletions
......@@ -132,6 +132,8 @@ QGeoPositionInfoSourceWinRT::QGeoPositionInfoSourceWinRT(QObject *parent)
Q_D(QGeoPositionInfoSourceWinRT);
d->positionError = QGeoPositionInfoSource::NoError;
d->updatesOngoing = false;
d->positionToken.value = 0;
d->statusToken.value = 0;
}
QGeoPositionInfoSourceWinRT::~QGeoPositionInfoSourceWinRT()
......@@ -173,9 +175,6 @@ int QGeoPositionInfoSourceWinRT::init()
return -1;
}
d->positionToken.value = 0;
d->statusToken.value = 0;
d->periodicTimer.setSingleShot(true);
connect(&d->periodicTimer, &QTimer::timeout, this, &QGeoPositionInfoSourceWinRT::virtualPositionUpdate);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment