Various Mac related fixes (Thanks Mirco Chinelli)

This commit is contained in:
Christophe Dumez 2010-06-09 15:13:52 +00:00
parent 11fe685a6b
commit c31b5f1f97
7 changed files with 66 additions and 9 deletions

View file

@ -116,7 +116,10 @@ QString misc::QDesktopServicesCacheLocation() {
OSErr err = FSFindFolder(kUserDomain, kCachedDataFolderType, false, &ref);
if (err)
return QString();
QString path = getFullPath(ref);
QString path;
QByteArray ba(2048, 0);
if (FSRefMakePath(&ref, reinterpret_cast<UInt8 *>(ba.data()), ba.size()) == noErr)
path = QString::fromUtf8(ba).normalized(QString::NormalizationForm_C);
path += QLatin1Char('/') + qApp->applicationName();
return path;
#else