QGeoCodeReply Class
The QGeoCodeReply class manages an operation started by an instance of QGeoCodingManager. More...
| Header: | #include <QGeoCodeReply> |
| qmake: | QT += location |
| Since: | Qt 5.6 |
| Inherits: | QObject |
This class was introduced in Qt 5.6.
Public Types
| enum | Error { NoError, EngineNotSetError, CommunicationError, ParseError, UnsupportedOptionError, …, UnknownError } |
Detailed Description
Instances of QGeoCodeReply manage the state and results of these operations.
The isFinished(), error() and errorString() methods provide information on whether the operation has completed and if it completed successfully.
The finished() and error(QGeoCodeReply::Error,QString) signals can be used to monitor the progress of the operation.
It is possible that a newly created QGeoCodeReply may be in a finished state, most commonly because an error has occurred. Since such an instance will never emit the finished() or error(QGeoCodeReply::Error,QString) signals, it is important to check the result of isFinished() before making the connections to the signals. The documentation for QGeoCodingManager demonstrates how this might be carried out.
If the operation completes successfully the results will be able to be accessed with locations().
Member Type Documentation
enum QGeoCodeReply::Error
Describes an error which prevented the completion of the operation.
| Constant | Value | Description |
|---|---|---|
QGeoCodeReply::NoError | 0 | No error has occurred. |
QGeoCodeReply::EngineNotSetError | 1 | The geocoding manager that was used did not have a QGeoCodingManagerEngine instance associated with it. |
QGeoCodeReply::CommunicationError | 2 | An error occurred while communicating with the service provider. |
QGeoCodeReply::ParseError | 3 | The response from the service provider was in an unrecognizable format. |
QGeoCodeReply::UnsupportedOptionError | 4 | The requested operation or one of the options for the operation are not supported by the service provider. |
QGeoCodeReply::CombinationError | 5 | An error occurred while results where being combined from multiple sources. |
QGeoCodeReply::UnknownError | 6 | An error occurred which does not fit into any of the other categories. |