diff options
author | Niels Weber <niels.2.weber@nokia.com> | 2011-08-03 13:10:02 +0200 |
---|---|---|
committer | Niels Weber <niels.2.weber@nokia.com> | 2011-08-03 13:10:02 +0200 |
commit | 7d30142e81a54dc321a0e204603c8c16aadcb6ea (patch) | |
tree | d4ae7d32fe8bb0ed504323642920caba3c0d0ad8 /installerbuilder | |
parent | b643132866aee5fa0e3a1d9f37038fe7d3a5e5f9 (diff) |
Use more correct paths for icons on Linux
Should fix https://bugreports.qt.nokia.com/browse/QTSDK-703
Reviewed-by: Joerg
Diffstat (limited to 'installerbuilder')
-rw-r--r-- | installerbuilder/libinstaller/installiconsoperation.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/installerbuilder/libinstaller/installiconsoperation.cpp b/installerbuilder/libinstaller/installiconsoperation.cpp index 267743fa8..fee1b41e6 100644 --- a/installerbuilder/libinstaller/installiconsoperation.cpp +++ b/installerbuilder/libinstaller/installiconsoperation.cpp @@ -65,7 +65,8 @@ QString InstallIconsOperation::targetDirectory() } #endif - XDG_DATA_DIRS.push_back(QLatin1String("/usr/share")); // default path + XDG_DATA_DIRS.push_back(QLatin1String("/usr/share/pixmaps")); // default path + XDG_DATA_DIRS.push_back(QDir::home().absoluteFilePath(QLatin1String(".local/share/icons"))); // default path XDG_DATA_DIRS.push_back(QDir::home().absoluteFilePath(QLatin1String(".icons"))); // default path QString directory; @@ -74,17 +75,18 @@ QString InstallIconsOperation::targetDirectory() if (it->isEmpty()) continue; - if (it + 1 == directories.end()) + // our default dirs are correct, XDG_DATA_DIRS set via env need "icon" at the end + if ((it + 1 == directories.end()) || (it + 2 == directories.end()) || (it + 3 == directories.end())) directory = QDir(*it).absolutePath(); else directory = QDir(*it).absoluteFilePath(QLatin1String("icons")); QDir dir(directory); - // let's see wheter this dir exists or we're able to create it + // let's see if this dir exists or we're able to create it if (!dir.exists() && !QDir().mkpath(directory)) continue; - // we just try wheter we're able to open the file in ReadWrite + // we just try if we're able to open the file in ReadWrite QFile file(QDir(directory).absoluteFilePath(QLatin1String("tmpfile"))); const bool existed = file.exists(); if (!file.open(QIODevice::ReadWrite)) |