diff options
author | abcd <amos.choy@nokia.com> | 2012-07-02 11:03:10 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-03 03:49:52 +0200 |
commit | a541750c61fd31b2547e8e97930eafef6dd15612 (patch) | |
tree | 663d6aeaf2117a5957c5d0e545e04a062488ae62 /src/plugins | |
parent | 95242f2cc8cb47ab539299ecf4f9dd39f4fae73d (diff) | |
download | qtlocation-a541750c61fd31b2547e8e97930eafef6dd15612.tar.gz |
Refactor detection of unsupported search parameter combinations
Change-Id: I58c4992d4f189effdbd43df691d6eb01e730c422
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp index 4ad92458..4a031c66 100644 --- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp +++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp @@ -381,9 +381,10 @@ QPlaceSearchReply *QPlaceManagerEngineNokiaV2::search(const QPlaceSearchRequest // Both a search term and search categories are not supported. unsupported |= !query.searchTerm().isEmpty() && !query.categories().isEmpty(); - unsupported |= !query.searchTerm().isEmpty() && !query.recommendationId().isEmpty(); - - unsupported |= !query.categories().isEmpty() && !query.recommendationId().isEmpty(); + //only a recommendation id by itself is supported. + unsupported |= !query.recommendationId().isEmpty() + && (!query.searchTerm().isEmpty() || !query.categories().isEmpty() + || query.searchArea().type() != QGeoShape::UnknownType); if (unsupported) { QPlaceSearchReplyImpl *reply = new QPlaceSearchReplyImpl(query, 0, this); |