Commit d1331045 authored by Eike Ziller's avatar Eike Ziller
Browse files

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: default avatarRené J.V. Bertin <>
Reviewed-by: default avatarErik Verbruggen <>
parent fee1b341
......@@ -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];
}] retain];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment