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
This commit is contained in:
Marcus Müller 2013-12-31 13:14:11 +00:00
parent 64d6268f40
commit 83cf4ab39f
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2013-12-31 Marcus Mueller <znek@mulle-kybernetik.com>
* 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 <znek@mulle-kybernetik.com>
* Headers/GNUstepBase/GSVersionMacros.h: added macros

View file

@ -26,6 +26,7 @@
#ifndef __NSMetadata_h_GNUSTEP_BASE_INCLUDE
#define __NSMetadata_h_GNUSTEP_BASE_INCLUDE
#import <GNUstepBase/GSVersionMacros.h>
#import <Foundation/NSObject.h>
#import <Foundation/NSTimer.h>
@ -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