diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-10 15:45:10 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-03 21:05:14 +0300 |
commit | 44757c534b950e2fca2d56d0ab4228b4123cf080 (patch) | |
tree | 6d51e0f3e9877e177a528fb06ae5e755a1d61f4c /src/location/doc | |
parent | 266e6a3269ab16846de3d6cbce39aa226d45934c (diff) | |
download | qtlocation-44757c534b950e2fca2d56d0ab4228b4123cf080.tar.gz |
Eradicate Java-style iterators and mark the module free of them
... and of QLinkedList
Java-style iterators are going to be deprecated, or at the very least
banned from use in Qt code. Ditto QLinkedList.
Unfortunately, the module contains more than 120 uses of Q_FOREACH,
even though, according to my sources, its use was banned in Qt
implementation from the get-go. So QT_NO_FOREACH is currently not an
option.
Change-Id: I0f05e9c78dda259b0eac1bcdfc7dddfcddc4b908
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/location/doc')
-rw-r--r-- | src/location/doc/snippets/places/requesthandler.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/location/doc/snippets/places/requesthandler.h b/src/location/doc/snippets/places/requesthandler.h index e5ee0d00..9aa5fe76 100644 --- a/src/location/doc/snippets/places/requesthandler.h +++ b/src/location/doc/snippets/places/requesthandler.h @@ -358,8 +358,8 @@ public slots: //! [Image handler] void handleImagesReply() { if (contentReply->error() == QPlaceReply::NoError) { - QMapIterator<int, QPlaceContent> iter(contentReply->content()); - while (iter.hasNext()) { + const auto content = contentReply->content(); + for (auto iter = content.cbegin(), end = content.cend(); iter != end; ++iter) { qDebug() << "Index: " << iter.key(); QPlaceImage image = iter.value(); qDebug() << image.url(); |