summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-06-09 13:27:28 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-06-09 13:35:54 (GMT)
commitd85d658881a424cf7d6be797d800c7821b21fffa (patch)
tree5cdb6e03610df028f95975119106814bd82bacff
parent6b628fb9754629cc8cdd5718edec296b02ab3b0e (diff)
downloadQt-d85d658881a424cf7d6be797d800c7821b21fffa.zip
Qt-d85d658881a424cf7d6be797d800c7821b21fffa.tar.gz
Qt-d85d658881a424cf7d6be797d800c7821b21fffa.tar.bz2
Skip empty parts in KDEDIRS
If KDEDIRS was set to an empty string, this would unintentionally bring /share into the icon search path. Reviewed-by: Olivier Goffart
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index f3d1537..9a4fc0f 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -848,7 +848,7 @@ void QCommonStylePrivate::lookupIconTheme() const
dataDirs = QLatin1String("/usr/local/share/:/usr/share/");
dataDirs += QLatin1Char(':') + QApplicationPrivate::kdeHome() + QLatin1String("/share");
dataDirs.prepend(QDir::homePath() + QLatin1String("/:"));
- QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'));
+ QStringList kdeDirs = QString::fromLocal8Bit(getenv("KDEDIRS")).split(QLatin1Char(':'), QString::SkipEmptyParts);
foreach (const QString &dirName, kdeDirs)
dataDirs.append(QLatin1String(":") + dirName + QLatin1String("/share"));
iconDirs = dataDirs.split(QLatin1Char(':'));