summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-20 09:07:37 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-05-21 08:56:28 +0200
commit4e026a2076dd6f612871e30fdcf49312b4647846 (patch)
treee7a5518a0e88c51de1abbd62f2f1d08d6964e0d6 /src
parent88978a5b03bdf75d428736fc139f020c7f0db35a (diff)
QQnxIntegration: replace a Java-style iterator with an STL-style loop
Java-style iterators are going to be deprecated. Change-Id: Ia55070608d3826bd84ed5d56a593c1c4918a6063 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index d9120256b3..f479e94988 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -607,12 +607,11 @@ QList<screen_display_t *> QQnxIntegration::sortDisplays(screen_display_t *availa
// Move all displays with matching ID from the intermediate list
// to the beginning of the ordered list
- QMutableListIterator<screen_display_t *> iter(allDisplays);
- while (iter.hasNext()) {
- screen_display_t *display = iter.next();
+ for (auto it = allDisplays.begin(), end = allDisplays.end(); it != end; ++it) {
+ screen_display_t *display = *it;
if (getIdOfDisplay(*display) == requestedValue) {
orderedDisplays.append(display);
- iter.remove();
+ allDisplays.erase(it);
break;
}
}