[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/icons
From: Michael Pyne <mpyne () kde ! org>
Date: 2010-05-29 2:59:28
Message-ID: 20100529030549.884A5AC8C2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1131793 by mpyne:
Use QSet instead of QMap where it is more appropriate.
I had used QMap since the header for it was already included, but a prompt from my
esteemed IRC colleague, kdepepo, reminded me that re-using QMap doesn't really help matters
since it's still creating a new class, so might as well use the most appropriate container.
M +3 -2 kicontheme.cpp
--- trunk/KDE/kdelibs/kdeui/icons/kicontheme.cpp #1131792:1131793
@@ -32,6 +32,7 @@
#include <QtCore/QCharRef>
#include <QtCore/QMutableStringListIterator>
#include <QtCore/QMap>
+#include <QtCore/QSet>
#include <QtGui/QPixmap>
#include <QtGui/QPixmapCache>
#include <QtGui/QImage>
@@ -133,7 +134,7 @@
QStringList::ConstIterator it, itDir;
QStringList themeDirs;
QString cDir;
- QMap<QString, bool> addedDirs; // Used for avoiding duplicates.
+ QSet<QString> addedDirs; // Used for avoiding duplicates.
// Applications can have local additions to the global "locolor" and
// "hicolor" icon themes. For these, the _global_ theme description
@@ -207,7 +208,7 @@
for (itDir=themeDirs.constBegin(); itDir!=themeDirs.constEnd(); ++itDir) {
const QString currentDir(*itDir + *it + '/');
if (KStandardDirs::exists(currentDir) && !addedDirs.contains(currentDir)) {
- addedDirs.insert(currentDir, true);
+ addedDirs.insert(currentDir);
KIconThemeDir *dir = new KIconThemeDir(*itDir, *it, cg);
if (!dir->isValid()) {
delete dir;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic