summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorabcd <amos.choy@nokia.com>2011-10-18 18:22:54 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-25 11:21:11 +0200
commit8ad0b02db24bc5539ebc3e25e641af5c8eadc0e4 (patch)
treefbc563f358b78a649837eedc9f477281ad45386a /tests
parent88104292901712ad14eeaa1a2e0e4755953fec96 (diff)
downloadqtlocation-8ad0b02db24bc5539ebc3e25e641af5c8eadc0e4.tar.gz
Fix inconsistency between removing places and categories
removing places used to take a place object while removing categories used a category id. Change removing places to use a place id. Change-Id: I2d603564df362b327fb2fdd27e1f2f00bf2ae833 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/geotestplugin/qplacemanagerengine_test.h8
-rw-r--r--tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/geotestplugin/qplacemanagerengine_test.h b/tests/auto/geotestplugin/qplacemanagerengine_test.h
index 297282a8..809879ca 100644
--- a/tests/auto/geotestplugin/qplacemanagerengine_test.h
+++ b/tests/auto/geotestplugin/qplacemanagerengine_test.h
@@ -189,16 +189,16 @@ public:
return reply;
}
- QPlaceIdReply *removePlace(const QPlace &place)
+ QPlaceIdReply *removePlace(const QString &placeId)
{
IdReply *reply = new IdReply(QPlaceIdReply::RemovePlace, this);
- reply->setId(place.placeId());
+ reply->setId(placeId);
- if (!m_places.contains(place.placeId())) {
+ if (!m_places.contains(placeId)) {
reply->setError(QPlaceReply::PlaceDoesNotExistError, tr("Place does not exist"));
QMetaObject::invokeMethod(reply, "emitError", Qt::QueuedConnection);
} else {
- m_places.remove(place.placeId());
+ m_places.remove(placeId);
}
QMetaObject::invokeMethod(reply, "emitFinished", Qt::QueuedConnection);
diff --git a/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp b/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp
index a3db9c26..3b85f3a2 100644
--- a/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp
+++ b/tests/auto/qplacemanager_jsondb/tst_qplacemanager_jsondb.cpp
@@ -1112,7 +1112,7 @@ void tst_QPlaceManagerJsonDb::doSavePlaces(const QList<QPlace *> &places)
bool tst_QPlaceManagerJsonDb::doRemovePlace(const QPlace &place,
QPlaceReply::Error expectedError)
{
- QPlaceIdReply *removeReply = placeManager->removePlace(place);
+ QPlaceIdReply *removeReply = placeManager->removePlace(place.placeId());
bool isSuccessful = false;
isSuccessful = checkSignals(removeReply, expectedError)
&& (removeReply->id() == place.placeId());