SVN commit 1210517 by pino: use a QListIterator to iterate safely from the end to the begin of the list M +5 -5 desktop.cpp --- trunk/extragear/utils/kpager/desktop.cpp #1210516:1210517 @@ -137,9 +137,12 @@ if (list.count() <= 0) return 0L; - for (QList::ConstIterator it = list.constEnd(); ; --it) + QListIterator it(list); + it.toBack(); + while (it.hasPrevious()) { - KWindowInfo* info = pager()->info( *it ); + const WId id = it.previous(); + KWindowInfo* info = pager()->info(id); if (shouldPaintWindow(info)) { r=info->geometry(); @@ -156,9 +159,6 @@ return info; } } - - if (it == list.constBegin()) - break; } return 0L; }