fixing wrong usage of QList::erase(QList::iterator) (also for QHash)