ahmadsamir added a comment.
In D27965#625526 <https://phabricator.kde.org/D27965#625526>, @apol wrote: > Having the iterated value change under the hood will eventually break. I'd suggest preferring QList::erase to QList::removeOne. Actually, the code also uses 'delete current', now if there's another instance of that AuthInfoContainer* in authList, on a next iteration accessing the pointer "current" would be invalid as the object it had pointed to has been already delete'ed... I think removeAll() would be a better fit; WDYT? REPOSITORY R241 KIO BRANCH l-kpasswdserver (branched from master) REVISION DETAIL https://phabricator.kde.org/D27965 To: ahmadsamir, #frameworks, dfaure, meven Cc: apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns