summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-10-11 12:24:30 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-11 18:49:12 +0200
commitdd5e40d9c683dbedcde911e1abd7bfcec87ca514 (patch)
treeb7b2c0818dea761e025085624dfe4302599ca6e5 /src
parent40ad5397872bb753063e0edeefc1ad0fdc702f5b (diff)
Allow custom definition of Q_FORWARD_DECLARE_OBJC_CLASS and friends
Change-Id: I761ef508672d5d4e8b9067a1b5f91debe09607d4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qglobal.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index b1a22ddf03..d7253c39c6 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -998,13 +998,19 @@ template <bool B, typename T = void> struct QEnableIf;
template <typename T> struct QEnableIf<true, T> { typedef T Type; };
}
-#ifdef __OBJC__
-#define Q_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
-#else
-#define Q_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname
+#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
+# ifdef __OBJC__
+# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
+# else
+# define Q_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname
+# endif
+#endif
+#ifndef Q_FORWARD_DECLARE_CF_TYPE
+# define Q_FORWARD_DECLARE_CF_TYPE(type) typedef const struct __ ## type * type ## Ref
+#endif
+#ifndef Q_FORWARD_DECLARE_MUTABLE_CF_TYPE
+# define Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) typedef struct __ ## type * type ## Ref
#endif
-#define Q_FORWARD_DECLARE_CF_TYPE(type) typedef const struct __ ## type * type ## Ref
-#define Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) typedef struct __ ## type * type ## Ref
QT_END_NAMESPACE
// Q_GLOBAL_STATIC