diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-06-22 17:39:00 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-07-06 10:04:51 +0000 |
commit | d133104596099c4805404095a72520a77c89f205 (patch) | |
tree | 8ae490aee9b0056f0d2dc5d038c317d8d14ae788 | |
parent | fee1b34149cf1704c929fe477bffd0b02b2d431b (diff) |
OS X: Do not use too recent API for spotlight locator filter
NSMetadataQueryUpdateAddedItemsKey is only available on 10.9 or later
and is available through Foundation only in 10.10.
Use the CoreServices constant instead, which is available since 10.4.
Task-number: QTCREATORBUG-14525
Change-Id: Icddedb77c77efca82ca00090c8a5d53db3284c96
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
-rw-r--r-- | src/plugins/coreplugin/locator/spotlightlocatorfilter.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm b/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm index 4b632745ad..cb29e2c3c7 100644 --- a/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm +++ b/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm @@ -45,6 +45,8 @@ #include <Foundation/NSOperation.h> #include <Foundation/NSPredicate.h> +#include <CoreServices/CoreServices.h> + namespace Core { namespace Internal { @@ -96,7 +98,7 @@ SpotlightIterator::SpotlightIterator(const QString &expression) usingBlock:^(NSNotification *note) { [m_query disableUpdates]; QMutexLocker lock(&m_mutex); Q_UNUSED(lock) - [m_queue addObjectsFromArray:[note.userInfo objectForKey:NSMetadataQueryUpdateAddedItemsKey]]; + [m_queue addObjectsFromArray:[note.userInfo objectForKey:(NSString *)kMDQueryUpdateAddedItems]]; [m_query enableUpdates]; m_waitForItems.wakeAll(); }] retain]; |