diff options
Diffstat (limited to 'src/corelib/io/qstandardpaths_unix.cpp')
-rw-r--r-- | src/corelib/io/qstandardpaths_unix.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/io/qstandardpaths_unix.cpp b/src/corelib/io/qstandardpaths_unix.cpp index b1c5869f71..4a4b5049aa 100644 --- a/src/corelib/io/qstandardpaths_unix.cpp +++ b/src/corelib/io/qstandardpaths_unix.cpp @@ -62,15 +62,18 @@ QString QStandardPaths::writableLocation(StandardLocation type) case TempLocation: return QDir::tempPath(); case CacheLocation: + case GenericCacheLocation: { // http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html QString xdgCacheHome = QFile::decodeName(qgetenv("XDG_CACHE_HOME")); if (xdgCacheHome.isEmpty()) xdgCacheHome = QDir::homePath() + QLatin1String("/.cache"); - if (!QCoreApplication::organizationName().isEmpty()) - xdgCacheHome += QLatin1Char('/') + QCoreApplication::organizationName(); - if (!QCoreApplication::applicationName().isEmpty()) - xdgCacheHome += QLatin1Char('/') + QCoreApplication::applicationName(); + if (type == QStandardPaths::CacheLocation) { + if (!QCoreApplication::organizationName().isEmpty()) + xdgCacheHome += QLatin1Char('/') + QCoreApplication::organizationName(); + if (!QCoreApplication::applicationName().isEmpty()) + xdgCacheHome += QLatin1Char('/') + QCoreApplication::applicationName(); + } return xdgCacheHome; } case DataLocation: |