On Sat, May 29, 2010 at 05:05:49AM +0200, Michael Pyne wrote: > SVN commit 1131793 by mpyne: > > Use QSet instead of QMap where it is more appropriate. > > --- trunk/KDE/kdelibs/kdeui/icons/kicontheme.cpp #1131792:1131793 > @@ -207,7 +208,7 @@ > for (itDir=themeDirs.constBegin(); itDir!=themeDirs.constEnd(); ++itDir) { > const QString currentDir(*itDir + *it + '/'); > if (KStandardDirs::exists(currentDir) && !addedDirs.contains(currentDir)) { > you should do the duplicate check first, as it is a lot less expensive than the existence test. and you could cache negative hits as well then.