diff options
author | João Abecasis <joao@abecasis.name> | 2009-06-09 13:27:28 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-06-09 13:35:54 (GMT) |
commit | d85d658881a424cf7d6be797d800c7821b21fffa (patch) | |
tree | 5cdb6e03610df028f95975119106814bd82bacff | |
parent | 6b628fb9754629cc8cdd5718edec296b02ab3b0e (diff) | |
download | Qt-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.cpp | 2 |
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(':')); |