From 006bb252a0470848ad3d39794bc0b4721d43a6d5 Mon Sep 17 00:00:00 2001 From: znek Date: Tue, 31 Dec 2013 13:14:11 +0000 Subject: [PATCH] NSMetadataQueryDelegate uses new GS_PROTOCOLS_HAVE_OPTIONAL macro now (and minor tweaks) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37528 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Headers/Foundation/NSMetadata.h | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c204ee90..199556c5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-12-31 Marcus Mueller + + * Headers/Foundation/NSMetadata.h: use GS_PROTOCOLS_HAVE_OPTIONAL for + NSMetadataQueryDelegate. Always define the protocol, even if it's empty + (so we don't have to adjust any headers), but fallback to the informal + protocol if OS version < 10.6 OR compiler doesn't support @optional + keyword in protocols. + 2013-12-30 Marcus Mueller * Headers/GNUstepBase/GSVersionMacros.h: added macros diff --git a/Headers/Foundation/NSMetadata.h b/Headers/Foundation/NSMetadata.h index ddb91a9f1..29c835fc0 100644 --- a/Headers/Foundation/NSMetadata.h +++ b/Headers/Foundation/NSMetadata.h @@ -26,6 +26,7 @@ #ifndef __NSMetadata_h_GNUSTEP_BASE_INCLUDE #define __NSMetadata_h_GNUSTEP_BASE_INCLUDE +#import #import #import @@ -129,9 +130,12 @@ GS_EXPORT NSString * const NSMetadataQueryGatheringProgressNotification; @end @protocol NSMetadataQueryDelegate -#ifdef __OBJC2__ +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) && GS_PROTOCOLS_HAVE_OPTIONAL @optional -#endif +#else +@end +@interface NSObject (NSMetadataQueryDelegate) +#endif // GS_PROTOCOLS_HAVE_OPTIONAL - (id) metadataQuery: (NSMetadataQuery *)query replacementObjectForResultObject: (NSMetadataItem *)result; - (id) metadataQuery: (NSMetadataQuery *)query