From 96c918ff8d22083f9b0be4d0196ccb43642f8c0f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 16 Nov 2011 21:47:00 +0200 Subject: [PATCH] misc.cpp: Fix compilation on Mac OS X --- src/misc.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/misc.cpp b/src/misc.cpp index 60c4b1df4..d411a9ac6 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -59,7 +59,6 @@ const int UNLEN = 256; #ifdef Q_WS_MAC #include #include -#include #endif #ifndef Q_WS_WIN @@ -113,9 +112,6 @@ QString misc::QDesktopServicesDataLocation() { return result; #else #ifdef Q_WS_MAC - // http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); - NSString *dataDirectory = FSRef ref; OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, false, &ref); if (err) @@ -204,19 +200,7 @@ QString misc::QDesktopServicesDownloadLocation() { #endif #ifdef Q_WS_MAC - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); - NSString *applicationDirectory = [paths objectAtIndex:0]; - NSRange range; - range.location = 0; - range.length = [applicationDirectory length]; - QString path(range.length, QChar(0)); - - unichar *chars = new unichar[range.location]; - [nsstr getCharacters:chars range:range]; - QString path = QString::fromUtf16(chars, range.length); - delete chars; - path += QLatin1Char('/') + qApp->applicationName(); - return path; + // TODO: How to support this on Mac OS X? #endif // Fallback