diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-29 13:15:15 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-29 13:27:23 +0100 |
commit | 5f04d1d0d758faa29d3ab165f6fffc93381cd569 (patch) | |
tree | 9a395e4f1a91fda201f4c1749b9ece33fc9b5469 | |
parent | 7823598fa4774141568e5b6d73c4277a452f8d16 (diff) | |
parent | 6bbca99baa50eee50d1559335a66f1b2189d456d (diff) |
Merge pull request #5477
6bbca99 LSSharedFileListItemResolve() was deprecated in Mac OS X 10.10, use LSSharedFileListItemCopyResolvedURL() instead (Cory Fields)
-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); |