Properly forward-declare the Apple types with Q_QDOC
They are needed for the header to be parsed properly with clang based qdoc. While we are at it, change the condition from Q_OS_MAC to Q_OS_DARWIN Change-Id: I2a2f9c1159f47795d9811023d67c86fec1866846 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
parent
e70324f8dd
commit
375c5a0076
@ -48,7 +48,7 @@
|
||||
#include <QtCore/qpair.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
Q_FORWARD_DECLARE_CF_TYPE(CFURL);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSURL);
|
||||
#endif
|
||||
@ -275,7 +275,7 @@ public:
|
||||
static QByteArray toPercentEncoding(const QString &,
|
||||
const QByteArray &exclude = QByteArray(),
|
||||
const QByteArray &include = QByteArray());
|
||||
#if defined(Q_OS_MAC) || defined(Q_QDOC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
static QUrl fromCFURL(CFURLRef url);
|
||||
CFURLRef toCFURL() const Q_DECL_CF_RETURNS_RETAINED;
|
||||
static QUrl fromNSURL(const NSURL *url);
|
||||
|
@ -55,7 +55,7 @@ typedef struct _GUID
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_DARWIN)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
Q_FORWARD_DECLARE_CF_TYPE(CFUUID);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSUUID);
|
||||
#endif
|
||||
|
@ -56,7 +56,7 @@
|
||||
#error qbytearray.h must be included before any header file that defines truncate
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
Q_FORWARD_DECLARE_CF_TYPE(CFData);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSData);
|
||||
#endif
|
||||
@ -382,7 +382,7 @@ public:
|
||||
static QByteArray fromHex(const QByteArray &hexEncoded) Q_REQUIRED_RESULT;
|
||||
static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%') Q_REQUIRED_RESULT;
|
||||
|
||||
#if defined(Q_OS_MAC) || defined(Q_QDOC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
static QByteArray fromCFData(CFDataRef data);
|
||||
static QByteArray fromRawCFData(CFDataRef data);
|
||||
CFDataRef toCFData() const Q_DECL_CF_RETURNS_RETAINED;
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
Q_FORWARD_DECLARE_CF_TYPE(CFDate);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSDate);
|
||||
#endif
|
||||
@ -311,7 +311,7 @@ public:
|
||||
#endif
|
||||
static qint64 currentMSecsSinceEpoch() Q_DECL_NOTHROW;
|
||||
|
||||
#if defined(Q_OS_MAC) || defined(Q_QDOC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
static QDateTime fromCFDate(CFDateRef date);
|
||||
CFDateRef toCFDate() const Q_DECL_CF_RETURNS_RETAINED;
|
||||
static QDateTime fromNSDate(const NSDate *date);
|
||||
|
@ -68,7 +68,7 @@ namespace std
|
||||
#error qstring.h must be included before any header file that defines truncate
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
Q_FORWARD_DECLARE_CF_TYPE(CFString);
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
|
||||
#endif
|
||||
@ -778,7 +778,7 @@ public:
|
||||
inline std::u32string toStdU32String() const;
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC) || defined(Q_QDOC)
|
||||
#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
|
||||
static QString fromCFString(CFStringRef string);
|
||||
CFStringRef toCFString() const Q_DECL_CF_RETURNS_RETAINED;
|
||||
static QString fromNSString(const NSString *string);
|
||||
|
Loading…
x
Reference in New Issue
Block a user