diff options
author | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-10-30 13:49:05 (GMT) |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2009-10-30 13:50:33 (GMT) |
commit | 4510c18ed3ffd2c01d11159fc2d2ec7f0eb48e42 (patch) | |
tree | 0734081121e4aa284168515e7ddb5732b04471d1 /src/gui/util/qdesktopservices_mac.cpp | |
parent | 5cca60ad593cc5b8778d7be0b8137ffecd34b247 (diff) | |
download | Qt-4510c18ed3ffd2c01d11159fc2d2ec7f0eb48e42.zip Qt-4510c18ed3ffd2c01d11159fc2d2ec7f0eb48e42.tar.gz Qt-4510c18ed3ffd2c01d11159fc2d2ec7f0eb48e42.tar.bz2 |
Fix QDesktopServices::DataLocation on Mac.
DataLocation now behaves as on the other platforms,
QCoreApplication::organizationName() and applicationName()
is included in the returned path.
Diffstat (limited to 'src/gui/util/qdesktopservices_mac.cpp')
-rw-r--r-- | src/gui/util/qdesktopservices_mac.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/util/qdesktopservices_mac.cpp b/src/gui/util/qdesktopservices_mac.cpp index 0626e0a..23f9e60 100644 --- a/src/gui/util/qdesktopservices_mac.cpp +++ b/src/gui/util/qdesktopservices_mac.cpp @@ -153,9 +153,12 @@ QString QDesktopServices::storageLocation(StandardLocation type) QString path = getFullPath(ref); - QString appName = QCoreApplication::applicationName(); - if (!appName.isEmpty() && (type == DataLocation || type == CacheLocation)) - path += QLatin1Char('/') + appName; + if (type == DataLocation || type == CacheLocation) { + if (QCoreApplication::organizationName().isEmpty() == false) + path += QLatin1Char('/') + QCoreApplication::organizationName(); + if (QCoreApplication::applicationName().isEmpty() == false) + path += QLatin1Char('/') + QCoreApplication::applicationName(); + } return path; } |