Use a QMutableHashIterator in KItemListViewAnimation::slotFinished() for deleting an item from a hash

Review Request #116666 - Created March 9, 2014 and submitted

Information
Frank Reininghaus
kde-baseapps
KDE/4.13
331876
Reviewers
dolphin
KItemListViewAnimation::slotFinished() uses a QHashIterator to iterate over a QHash, and then removes an item from the hash using QHash::remove() inside the loop.

This is quite unusual - the recommended way is to use a QMutableHashIterator (or std-style iterators and then QHash::erase(it)).

This might be related to the cause of the crash.
I couldn't find any regressions, but I cannot be sure that it fixes the crash because I cannot reproduce the crash.
Emmanuel Pescosta
Vishesh Handa
Commit Hook
Frank Reininghaus
Review request changed

Status: Closed (submitted)

Loading...