diff options
author | Aaron McCarthy <mccarthy.aaron@gmail.com> | 2015-01-23 15:37:19 +1000 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-02-02 07:33:42 +0000 |
commit | dbfa9eeaae4b0508a0d4de41d0578003e98d357b (patch) | |
tree | da81c7ec0773dd8e9021227ad47d1aa7fbb7be5c /src/location/places | |
parent | d2ff57fec56b575059737e91cf6dbdcd3d610e6f (diff) |
Add support for places to Open Street Map plugin.
Implement basic places support based on the Open Street Map Nominatim
service. Support for read only categories and place searching is
supported.
The plugin does not support getting place details, getting place
content, search suggestions, saving/removing places or saving/removing
categories.
Change-Id: I5a185cdf25b50d5b377be4d2c3c53c8f1e807288
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/places')
-rw-r--r-- | src/location/places/qplacemanager.cpp | 6 | ||||
-rw-r--r-- | src/location/places/qplacemanagerengine.cpp | 4 | ||||
-rw-r--r-- | src/location/places/unsupportedreplies_p.h | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp index 451bb93a..7d1e6f28 100644 --- a/src/location/places/qplacemanager.cpp +++ b/src/location/places/qplacemanager.cpp @@ -152,11 +152,11 @@ QPlaceManager::QPlaceManager(QPlaceManagerEngine *engine, QObject *parent) this, SIGNAL(placeRemoved(QString)), Qt::QueuedConnection); connect(d, SIGNAL(categoryAdded(QPlaceCategory,QString)), - this, SIGNAL(categoryAdded(QPlaceCategory,QString)), Qt::QueuedConnection); + this, SIGNAL(categoryAdded(QPlaceCategory,QString))); connect(d, SIGNAL(categoryUpdated(QPlaceCategory,QString)), - this, SIGNAL(categoryUpdated(QPlaceCategory,QString)), Qt::QueuedConnection); + this, SIGNAL(categoryUpdated(QPlaceCategory,QString))); connect(d, SIGNAL(categoryRemoved(QString,QString)), - this, SIGNAL(categoryRemoved(QString,QString)), Qt::QueuedConnection); + this, SIGNAL(categoryRemoved(QString,QString))); connect(d, SIGNAL(dataChanged()), this, SIGNAL(dataChanged()), Qt::QueuedConnection); } else { diff --git a/src/location/places/qplacemanagerengine.cpp b/src/location/places/qplacemanagerengine.cpp index 6cee5d8a..9602b021 100644 --- a/src/location/places/qplacemanagerengine.cpp +++ b/src/location/places/qplacemanagerengine.cpp @@ -159,8 +159,8 @@ QPlaceSearchReply *QPlaceManagerEngine::search(const QPlaceSearchRequest &reques { Q_UNUSED(request) - return new QPlaceSearchReplyUnsupported(QStringLiteral("Place search is not supported."), - this); + return new QPlaceSearchReplyUnsupported(QPlaceReply::UnsupportedError, + QStringLiteral("Place search is not supported."), this); } /*! diff --git a/src/location/places/unsupportedreplies_p.h b/src/location/places/unsupportedreplies_p.h index 7e431fbe..b915004a 100644 --- a/src/location/places/unsupportedreplies_p.h +++ b/src/location/places/unsupportedreplies_p.h @@ -96,10 +96,11 @@ class QPlaceSearchReplyUnsupported : public QPlaceSearchReply Q_OBJECT public: - QPlaceSearchReplyUnsupported(const QString &message, QPlaceManagerEngine *parent) + QPlaceSearchReplyUnsupported(QPlaceReply::Error errorCode, const QString &message, + QPlaceManagerEngine *parent) : QPlaceSearchReply(parent) { - setError(QPlaceReply::UnsupportedError, message); + setError(errorCode, message); setFinished(true); QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection, Q_ARG(QPlaceReply::Error, error()), |