summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2012-11-01 12:31:50 +0100
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-02-26 13:13:27 +0100
commit3bc4afc223bcd56245797a0bd3628f02a992301c (patch)
tree6ecd384c3350e6fece45366d32ba8af5a2aed6fe /src
parent8224e5ac7f5f69a64b6ad62bb60277a274bcc60e (diff)
iOS: Move Q_OS_IOS out of makesespec to qsystemdetection.h
We treat iOS as a variant of Mac OS, so for iOS both Q_OS_MAC and Q_OS_IOS will be defined. This matches what Apple assumes in the header file TargetConditionals.h Change-Id: I55cc851401b748297478e4c32e84e0f6e1fdfc28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qsystemdetection.h6
-rw-r--r--src/corelib/kernel/qcore_mac_p.h2
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/global/qsystemdetection.h b/src/corelib/global/qsystemdetection.h
index eb7aa2e64f..86c724ebb5 100644
--- a/src/corelib/global/qsystemdetection.h
+++ b/src/corelib/global/qsystemdetection.h
@@ -50,6 +50,8 @@
The operating system, must be one of: (Q_OS_x)
DARWIN - Darwin OS (synonym for Q_OS_MAC)
+ MAC - Mac OS X or iOS (iPhoneOS)
+ IOS - iOS (treated as a variant of Mac OS)
MSDOS - MS-DOS and Windows
OS2 - OS/2
OS2EMX - XFree86 on OS/2 (not PM)
@@ -166,6 +168,10 @@
# elif defined(Q_OS_DARWIN32)
# define Q_OS_MAC32
# endif
+# include <TargetConditionals.h>
+# if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
+# define Q_OS_IOS
+# endif
#endif
#if defined(Q_OS_WIN)
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index b833eb4962..361a6c2c67 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -63,6 +63,8 @@
#include <CoreFoundation/CoreFoundation.h>
#endif
+#include "qglobal.h"
+
#ifndef Q_OS_IOS
#include <CoreServices/CoreServices.h>
#endif
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index ef5bdbbf0d..fbd836f763 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -39,6 +39,8 @@
**
****************************************************************************/
+#include "qglobal.h"
+
#ifndef Q_OS_IOS
#import <Cocoa/Cocoa.h>
#import <IOKit/graphics/IOGraphicsLib.h>