diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2015-01-21 07:49:14 +0100 |
---|---|---|
committer | Pavel JanÃk <Pavel@Janik.cz> | 2015-01-21 19:07:28 +0100 |
commit | 6bbca99baa50eee50d1559335a66f1b2189d456d (patch) | |
tree | 88b3a55c3407e1767e1b56c242fc7353d1f73113 /src | |
parent | 2eda47bc37bee37e409346e4c396d59925c06250 (diff) | |
download | bitcoin-6bbca99baa50eee50d1559335a66f1b2189d456d.tar.xz |
LSSharedFileListItemResolve() was deprecated in Mac OS X 10.10, use LSSharedFileListItemCopyResolvedURL() instead
Diffstat (limited to 'src')
-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 c675235cc2..149e0da442 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -696,7 +696,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); |