diff options
author | Ian Chen <ian.1.chen@nokia.com> | 2012-06-06 15:51:32 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 06:58:27 +0200 |
commit | 02e30cb825e0bb587dae238cd24cbb8a86c5a4fa (patch) | |
tree | a9c31a1c97079a32c520f6530cfa97348db37370 /src/imports/location/qdeclarativegeocodemodel.cpp | |
parent | 5b29f800f328b7ac8d944049981d021181e86907 (diff) |
Set geocode/route model to act only its own reply
Task-number: QTBUG-25133
Change-Id: I59fac21ad8384d9dc3b21dbbb72571b883d20fee
Reviewed-by: Jean Gressmann <jean.gressmann@nokia.com>
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/imports/location/qdeclarativegeocodemodel.cpp')
-rw-r--r-- | src/imports/location/qdeclarativegeocodemodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/imports/location/qdeclarativegeocodemodel.cpp b/src/imports/location/qdeclarativegeocodemodel.cpp index 6fd45038..aeedee89 100644 --- a/src/imports/location/qdeclarativegeocodemodel.cpp +++ b/src/imports/location/qdeclarativegeocodemodel.cpp @@ -368,9 +368,8 @@ QObject *QDeclarativeGeocodeModel::bounds() const void QDeclarativeGeocodeModel::geocodeFinished(QGeocodeReply *reply) { - if (reply->error() != QGeocodeReply::NoError) { + if (reply != reply_ || reply->error() != QGeocodeReply::NoError) return; - } int oldCount = declarativeLocations_.count(); setLocations(reply->locations()); setErrorString(""); @@ -390,6 +389,8 @@ void QDeclarativeGeocodeModel::geocodeError(QGeocodeReply *reply, QGeocodeReply::Error error, const QString &errorString) { + if (reply != reply_) + return; Q_UNUSED(error); int oldCount = declarativeLocations_.count(); if (oldCount > 0) { |