From 597df79c27a2573d540e231bb7b88baf40e5e58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 2 May 2016 18:45:59 +0200 Subject: darwin: Simplify conversion function declarations in headers We don't need to include Q_QDOC in the forward-declarations of the native types, and Q_FORWARD_DECLARE_OBJC_CLASS works in non-Objective-C mode as well, which means we can declare the Objective-C versions of the functions without guards. Change-Id: I32089c496b4f7ce47f0388ba3f65e0b091d1e9ee Reviewed-by: Martin Smith Reviewed-by: Jake Petroules --- src/corelib/tools/qbytearray.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/corelib/tools/qbytearray.h') diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index bf4175d67e..35efd5d6a9 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -56,11 +56,9 @@ #error qbytearray.h must be included before any header file that defines truncate #endif -#if defined(Q_OS_MAC) || defined(Q_QDOC) +#if defined(Q_OS_MAC) Q_FORWARD_DECLARE_CF_TYPE(CFData); -# if defined(__OBJC__) || defined(Q_QDOC) Q_FORWARD_DECLARE_OBJC_CLASS(NSData); -# endif #endif QT_BEGIN_NAMESPACE @@ -389,12 +387,10 @@ public: static QByteArray fromRawCFData(CFDataRef data); CFDataRef toCFData() const Q_DECL_CF_RETURNS_RETAINED; CFDataRef toRawCFData() const Q_DECL_CF_RETURNS_RETAINED; -# if defined(__OBJC__) || defined(Q_QDOC) static QByteArray fromNSData(const NSData *data); static QByteArray fromRawNSData(const NSData *data); NSData *toNSData() const Q_DECL_NS_RETURNS_AUTORELEASED; NSData *toRawNSData() const Q_DECL_NS_RETURNS_AUTORELEASED; -# endif #endif typedef char *iterator; -- cgit v1.2.3