summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r--src/corelib/tools/qstring.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 3933e3978e..798ff2f3e0 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -65,8 +65,10 @@ namespace std
#endif
#ifdef Q_OS_MAC
-Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
Q_FORWARD_DECLARE_CF_TYPE(CFString);
+# ifdef __OBJC__
+Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
+# endif
#endif
QT_BEGIN_NAMESPACE
@@ -682,8 +684,10 @@ public:
#if defined(Q_OS_MAC) || defined(Q_QDOC)
static QString fromCFString(CFStringRef string);
CFStringRef toCFString() const Q_DECL_CF_RETURNS_RETAINED;
+# if defined(__OBJC__) || defined(Q_QDOC)
static QString fromNSString(const NSString *string);
NSString *toNSString() const Q_DECL_NS_RETURNS_AUTORELEASED;
+# endif
#endif
// compatibility
struct Null { };