the 'item' reference may become invalid inside the loop.
this approach was chosen (instead of making 'item' a non-reference) to
keep the code more in sync with creator (where the string type is more
complex).
Change-Id: I60a4b0654dc47c0e3466d43904c358eb7e3e64e2
Reviewed-By: Marius Storm-Olsen
Reviewed-on: http://codereview.qt.nokia.com/1702
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
ret.prepend(item);
foreach (const QString &dep, dependees[item]) {
QSet<QString> &dset = dependencies[dep];
- dset.remove(item);
+ dset.remove(rootSet.at(i)); // *Don't* use 'item' - rootSet may have changed!
if (dset.isEmpty())
rootSet << dep;
}