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>
This commit is contained in:
Marc Mutz 2019-05-20 09:07:37 +02:00
parent 88978a5b03
commit 4e026a2076

View File

@ -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;
}
}