QDataWidgetMapper: use QList::reverse_iterator

... now that it's available.

Change-Id: I85f547b294688c97288aaeab2af213c59e856a2b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Marc Mutz 2015-06-26 20:10:54 +02:00
parent a8df43cd65
commit 62e3bd638a

View File

@ -756,7 +756,7 @@ void QDataWidgetMapper::clearMapping()
QList<QDataWidgetMapperPrivate::WidgetMapper> copy;
d->widgetMap.swap(copy); // a C++98 move
for (std::reverse_iterator<QList<QDataWidgetMapperPrivate::WidgetMapper>::const_iterator> it(copy.cend()), end(copy.cbegin()); it != end; ++it) {
for (QList<QDataWidgetMapperPrivate::WidgetMapper>::const_reverse_iterator it = copy.crbegin(), end = copy.crend(); it != end; ++it) {
if (it->widget)
it->widget->removeEventFilter(d->delegate);
}