diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/guiutil.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 8ad9b30624..2a13f43ea4 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -715,7 +715,18 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i); UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes; CFURLRef currentItemURL = NULL; - LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL, NULL); + +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100 + if(&LSSharedFileListItemCopyResolvedURL) + currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL); +#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100 + else + LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL, NULL); +#endif +#else + LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL, NULL); +#endif + if(currentItemURL && CFEqual(currentItemURL, findUrl)) { // found CFRelease(currentItemURL); |