diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-26 10:02:03 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-26 10:18:14 +0100 |
commit | 518633da419d6cfaf603773b9e8c5840e783bc4a (patch) | |
tree | 326ffd3f5497be64e38fa420af016867ada00538 /src/location/declarativemaps/qdeclarativegeocodemodel.cpp | |
parent | 9283a290040fd55f7eb34580b99f771d4facdeb4 (diff) | |
parent | 68b5ee9e7064f66fd7e7bd69b4b51229dbe8cc3c (diff) | |
download | qtlocation-518633da419d6cfaf603773b9e8c5840e783bc4a.tar.gz |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp
tests/plugins/declarativetestplugin/testhelper.h
Change-Id: Ie218ab1dc68642a6922e05e5688c20b90440b72e
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeocodemodel.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeocodemodel.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeocodemodel.cpp b/src/location/declarativemaps/qdeclarativegeocodemodel.cpp index 3e2a1aea..e5d0356f 100644 --- a/src/location/declarativemaps/qdeclarativegeocodemodel.cpp +++ b/src/location/declarativemaps/qdeclarativegeocodemodel.cpp @@ -382,12 +382,13 @@ void QDeclarativeGeocodeModel::geocodeFinished(QGeoCodeReply *reply) { if (reply != reply_ || reply->error() != QGeoCodeReply::NoError) return; + + reply->deleteLater(); + reply_ = 0; int oldCount = declarativeLocations_.count(); setLocations(reply->locations()); setError(NoError, QString()); setStatus(QDeclarativeGeocodeModel::Ready); - reply->deleteLater(); - reply_ = 0; emit locationsChanged(); if (oldCount != declarativeLocations_.count()) emit countChanged(); @@ -402,7 +403,9 @@ void QDeclarativeGeocodeModel::geocodeError(QGeoCodeReply *reply, { if (reply != reply_) return; - Q_UNUSED(error); + + reply->deleteLater(); + reply_ = 0; int oldCount = declarativeLocations_.count(); if (oldCount > 0) { // Reset the model @@ -412,8 +415,6 @@ void QDeclarativeGeocodeModel::geocodeError(QGeoCodeReply *reply, } setError(static_cast<QDeclarativeGeocodeModel::GeocodeError>(error), errorString); setStatus(QDeclarativeGeocodeModel::Error); - reply->deleteLater(); - reply_ = 0; } /*! |