diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2013-10-30 14:03:57 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-04 09:44:01 +0100 |
commit | 06860b6ed9c2dc7d00ef5d5afe913aea2bdf0be1 (patch) | |
tree | ff324770d0e11bce61394a3ec34ce9900a9a6343 | |
parent | 725beb507ac41b05f306a058c5e9a764b647688c (diff) | |
download | qtlocation-06860b6ed9c2dc7d00ef5d5afe913aea2bdf0be1.tar.gz |
Improve ClosedError handling in QGeoPositionInfoSource
The previously described behavior was introduced by a platform
which QtPositioning no longer supports. Effectively this is a
behavior change which currently doesn't affect any known backend.
The upcoming Android & BB10 backends support this new behavior.
The described behavior was very inconvenient from a QML developer's
perspective. Deleting a QML PositionSource is rather inconvenient and
difficult to do. The API should make a developer's life easier.
Task-number: QTBUG-33457
Change-Id: I94432c0569b647cd33c27f75ed73ce5322f40d47
Reviewed-by: Anders Gunnarsson <anders.gunnarsson@appello.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
-rw-r--r-- | src/imports/positioning/qdeclarativepositionsource.cpp | 6 | ||||
-rw-r--r-- | src/positioning/qgeopositioninfosource.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/positioning/qdeclarativepositionsource.cpp b/src/imports/positioning/qdeclarativepositionsource.cpp index eff548d2..a32557fd 100644 --- a/src/imports/positioning/qdeclarativepositionsource.cpp +++ b/src/imports/positioning/qdeclarativepositionsource.cpp @@ -667,9 +667,9 @@ void QDeclarativePositionSource::positionUpdateReceived(const QGeoPositionInfo & \list \li PositionSource.AccessError - The connection setup to the remote positioning backend failed because the application lacked the required privileges. - \li PositionSource.ClosedError - The remote positioning backend closed the connection, which happens for example in case - the user is switching location services to off. This object becomes invalid and should be deleted. - A new source can be declared later on to check whether the positioning backend is up again. + \li PositionSource.ClosedError - The positioning backend closed the connection, which happens for example in case + the user is switching location services to off. As soon as the location service is re-enabled + regular updates will resume. \li PositionSource.NoError - No error has occurred. \li PositionSource.UnknownSourceError - An unidentified error occurred. \li PositionSource.SocketError - An error occurred while connecting to an nmea source using a socket. diff --git a/src/positioning/qgeopositioninfosource.cpp b/src/positioning/qgeopositioninfosource.cpp index aeba422e..91d8bd56 100644 --- a/src/positioning/qgeopositioninfosource.cpp +++ b/src/positioning/qgeopositioninfosource.cpp @@ -461,8 +461,8 @@ QStringList QGeoPositionInfoSource::availableSources() \value AccessError The connection setup to the remote positioning backend failed because the application lacked the required privileges. \value ClosedError The remote positioning backend closed the connection, which happens for example in case - the user is switching location services to off. This object becomes invalid and should be deleted. - A call to createDefaultSource() can be used to create a new source later on. + the user is switching location services to off. As soon as the location service is re-enabled + regular updates will resume. \value NoError No error has occurred. \value UnknownSourceError An unidentified error occurred. */ |