summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-28 16:18:45 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-28 16:18:45 +0200
commit29f22fb5e8007cd280533ac765d355075f7102f5 (patch)
treecd0bdb7b82dd44b7160f6da1b2589d8800370ce0 /src
parent3368969a8fd4864b2349437fd2bea3339ce95c66 (diff)
parent6e39a7901091213ec93074d00a8c5aa1ba33d8a6 (diff)
downloadqtlocation-29f22fb5e8007cd280533ac765d355075f7102f5.tar.gz
Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: I92b8aba7f6f63acfa2de21a1b4451a108f622344
Diffstat (limited to 'src')
-rw-r--r--src/plugins/position/corelocation/qgeopositioninfosource_cl.mm12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm b/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm
index 65848f7d..8ebe7018 100644
--- a/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm
+++ b/src/plugins/position/corelocation/qgeopositioninfosource_cl.mm
@@ -78,10 +78,14 @@
newLocation.coordinate.longitude,
newLocation.altitude),
timeStamp);
- location.setAttribute(QGeoPositionInfo::HorizontalAccuracy, newLocation.horizontalAccuracy);
- location.setAttribute(QGeoPositionInfo::VerticalAccuracy, newLocation.verticalAccuracy);
- location.setAttribute(QGeoPositionInfo::Direction, newLocation.course);
- location.setAttribute(QGeoPositionInfo::GroundSpeed, newLocation.speed);
+ if (newLocation.horizontalAccuracy >= 0)
+ location.setAttribute(QGeoPositionInfo::HorizontalAccuracy, newLocation.horizontalAccuracy);
+ if (newLocation.verticalAccuracy >= 0)
+ location.setAttribute(QGeoPositionInfo::VerticalAccuracy, newLocation.verticalAccuracy);
+ if (newLocation.course >= 0)
+ location.setAttribute(QGeoPositionInfo::Direction, newLocation.course);
+ if (newLocation.speed >= 0)
+ location.setAttribute(QGeoPositionInfo::GroundSpeed, newLocation.speed);
m_positionInfoSource->locationDataAvailable(location);
}