summaryrefslogtreecommitdiff
path: root/tests/auto
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-01-16 14:32:21 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 02:11:24 +0100
commit1d0966c6924876655c52725e779a7aa24866ff60 (patch)
treebb7220ab3ccce1d057b80af33dbb8dd784d5782e /tests/auto
parent86db3df8cea7b9ac1e4ae078639de5fb5a43ca69 (diff)
downloadqtlocation-1d0966c6924876655c52725e779a7aa24866ff60.tar.gz
Remove offset attribute from place search requests.
Not all service providers support arbitrary search offsets. The offset attribute has been removed, instead service providers can supply a previous and next search query in the form of a QPlaceSearchRequest. Change-Id: If68e969b06f909f3fa62718656cbef70d1bf84a6 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative_core/tst_placesearchmodel.qml1
-rw-r--r--tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml3
-rw-r--r--tests/auto/nokia_services/places_semiauto/tst_places.cpp10
-rw-r--r--tests/auto/qplacesearchreply/tst_qplacesearchreply.cpp5
-rw-r--r--tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp4
5 files changed, 6 insertions, 17 deletions
diff --git a/tests/auto/declarative_core/tst_placesearchmodel.qml b/tests/auto/declarative_core/tst_placesearchmodel.qml
index f5223e4c..2020a4f8 100644
--- a/tests/auto/declarative_core/tst_placesearchmodel.qml
+++ b/tests/auto/declarative_core/tst_placesearchmodel.qml
@@ -101,7 +101,6 @@ TestCase {
return [
{ tag: "plugin", property: "plugin", signal: "pluginChanged", value: testPlugin },
{ tag: "searchArea", property: "searchArea", signal: "searchAreaChanged", value: testSearchArea, reset: QtPositioning.shape() },
- { tag: "offset", property: "offset", signal: "offsetChanged", value: 10, reset: 0 },
{ tag: "limit", property: "limit", signal: "limitChanged", value: 10, reset: -1 },
{ tag: "searchTerm", property: "searchTerm", signal: "searchTermChanged", value: "Test term", reset: "" },
diff --git a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml b/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
index 2d661b05..51f348e3 100644
--- a/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
+++ b/tests/auto/declarative_core/tst_placesearchsuggestionmodel.qml
@@ -78,7 +78,6 @@ TestCase {
return [
{ tag: "plugin", property: "plugin", signal: "pluginChanged", value: testPlugin },
{ tag: "searchArea", property: "searchArea", signal: "searchAreaChanged", value: testSearchArea, reset: QtPositioning.shape() },
- { tag: "offset", property: "offset", signal: "offsetChanged", value: 10, reset: 0 },
{ tag: "limit", property: "limit", signal: "limitChanged", value: 10, reset: -1 },
{ tag: "searchTerm", property: "searchTerm", signal: "searchTermChanged", value: "Test term", reset: "" },
@@ -86,7 +85,7 @@ TestCase {
}
function test_setAndGet(data) {
- //Utils.testObjectProperties(testCase, testModel, data);
+ Utils.testObjectProperties(testCase, testModel, data);
}
SignalSpy { id: statusChangedSpy; target: testModel; signalName: "statusChanged" }
diff --git a/tests/auto/nokia_services/places_semiauto/tst_places.cpp b/tests/auto/nokia_services/places_semiauto/tst_places.cpp
index 82853a7f..b22fa573 100644
--- a/tests/auto/nokia_services/places_semiauto/tst_places.cpp
+++ b/tests/auto/nokia_services/places_semiauto/tst_places.cpp
@@ -518,17 +518,9 @@ void tst_QPlaceManagerNokia::suggestions_data()
void tst_QPlaceManagerNokia::suggestionsMisc()
{
- //check providing an offset
+ //check providing a distance relevancy hint (should be ignored)
QPlaceSearchRequest searchRequest;
- searchRequest.setSearchArea(QGeoCircle(QGeoCoordinate(-27.5, 153)));
- searchRequest.setSearchTerm(QStringLiteral("sus"));
- searchRequest.setOffset(5);
QStringList results;
- QVERIFY(doSearchSuggestions(searchRequest, &results, QPlaceReply::BadArgumentError));
- QCOMPARE(results.count(), 0);
- searchRequest.clear();
-
- //check porviding a distance relevancy hint (should be ignored)
searchRequest.setSearchArea(QGeoCircle(QGeoCoordinate(-27.5, 153)));
searchRequest.setSearchTerm(QStringLiteral("sus"));
searchRequest.setRelevanceHint(QPlaceSearchRequest::DistanceHint);
diff --git a/tests/auto/qplacesearchreply/tst_qplacesearchreply.cpp b/tests/auto/qplacesearchreply/tst_qplacesearchreply.cpp
index 24a76bc7..43638334 100644
--- a/tests/auto/qplacesearchreply/tst_qplacesearchreply.cpp
+++ b/tests/auto/qplacesearchreply/tst_qplacesearchreply.cpp
@@ -42,9 +42,11 @@
#include <QtCore/QString>
#include <QtTest/QtTest>
+#include <QtPositioning/QGeoCircle>
+#include <QtLocation/QPlaceSearchRequest>
#include <QtLocation/QPlaceSearchReply>
#include <QtLocation/QPlaceResult>
-#include <QtPositioning/QGeoCircle>
+
QT_USE_NAMESPACE
@@ -101,7 +103,6 @@ void tst_QPlaceSearchReply::requestTest()
TestSearchReply *reply = new TestSearchReply(this);
QPlaceSearchRequest request;
request.setLimit(10);
- request.setOffset(50);
QGeoCircle circle;
circle.setCenter(QGeoCoordinate(10,20));
diff --git a/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp b/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp
index 318e8353..bd7589dd 100644
--- a/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp
+++ b/tests/auto/qplacesearchrequest/tst_qplacesearchrequest.cpp
@@ -268,16 +268,14 @@ void tst_QPlaceSearchRequest::clearTest()
category.setName("Fast Food");
req.setCategory(category);
req.setLimit(100);
- req.setOffset(5);
req.clear();
QVERIFY(req.searchTerm().isEmpty());
QVERIFY(req.searchArea() == QGeoShape());
QVERIFY(req.categories().isEmpty());
QVERIFY(req.limit() == -1);
- QVERIFY(req.offset() == 0);
}
-QTEST_APPLESS_MAIN(tst_QPlaceSearchRequest);
+QTEST_APPLESS_MAIN(tst_QPlaceSearchRequest)
#include "tst_qplacesearchrequest.moc"