summaryrefslogtreecommitdiff
path: root/src/imports/positioning/qdeclarativepositionsource_p.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2013-10-17 14:10:06 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-18 04:40:55 +0200
commit9f8ab3c280c53bba273cea32fdb5c7801949c344 (patch)
tree9374708ced8ccbcafe0ea8d85413afb7849ac815 /src/imports/positioning/qdeclarativepositionsource_p.h
parentb7a585ebd57f85c89ee20eda5b1a06819b3e1af0 (diff)
downloadqtlocation-9f8ab3c280c53bba273cea32fdb5c7801949c344.tar.gz
Update position when switching position sources.
The declarative position source only updates its position when an update arrives. The position property is now updated when: At construction time the position source may have a last known position available. When switching position sources, the position is updated to the last known position of the new source or invalidated in the case that no position source is selected. Change-Id: Ib67407f252f2e60d8fd4e32179847f465c1aaf94 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/imports/positioning/qdeclarativepositionsource_p.h')
-rw-r--r--src/imports/positioning/qdeclarativepositionsource_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imports/positioning/qdeclarativepositionsource_p.h b/src/imports/positioning/qdeclarativepositionsource_p.h
index 61593a28..bb229d5e 100644
--- a/src/imports/positioning/qdeclarativepositionsource_p.h
+++ b/src/imports/positioning/qdeclarativepositionsource_p.h
@@ -136,7 +136,10 @@ private Q_SLOTS:
void sourceErrorReceived(const QGeoPositionInfoSource::Error error);
void socketConnected();
void socketError(QAbstractSocket::SocketError error);
+
private:
+ void setPosition(const QGeoPositionInfo &pi);
+
QGeoPositionInfoSource *m_positionSource;
QDeclarativePosition m_position;
PositioningMethods m_preferredPositioningMethods;