Commit 74747087 authored by Andy Shaw's avatar Andy Shaw
Browse files

Don't recreate the position info source if we already have one


Task-number: QTBUG-67279
Change-Id: Iff2466cfe3b8bbdb77066f3318014fcb51e2e402
Reviewed-by: default avatarMichael Brüning <michael.bruning@qt.io>
Showing with 2 additions and 1 deletion
...@@ -104,7 +104,8 @@ static bool isHighAccuracySource(const QGeoPositionInfoSource *source) ...@@ -104,7 +104,8 @@ static bool isHighAccuracySource(const QGeoPositionInfoSource *source)
void QtPositioningHelper::start(bool highAccuracy) void QtPositioningHelper::start(bool highAccuracy)
{ {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
m_positionInfoSource = QGeoPositionInfoSource::createDefaultSource(this); if (!m_positionInfoSource)
m_positionInfoSource = QGeoPositionInfoSource::createDefaultSource(this);
if (!m_positionInfoSource) { if (!m_positionInfoSource) {
qWarning("Failed to initialize location provider: The system either has no default " qWarning("Failed to initialize location provider: The system either has no default "
"position source, no valid plugins could be found or the user does not have " "position source, no valid plugins could be found or the user does not have "
......
Supports Markdown
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