From f125fa554199a576fc93274cfbe69c928bd009bd Mon Sep 17 00:00:00 2001
From: Jake Petroules <jake.petroules@petroules.com>
Date: Sun, 2 Jun 2013 05:25:56 -0400
Subject: [PATCH] Further followup to Q_OS_MACX changes.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate,
remove a redundant condition in qtextcodec_p.h.

Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
---
 src/corelib/codecs/qtextcodec_p.h                         | 2 +-
 src/corelib/global/qglobal.cpp                            | 2 +-
 src/corelib/kernel/qcore_mac_p.h                          | 2 +-
 src/corelib/thread/qthread_unix.cpp                       | 4 ++--
 .../fontdatabases/mac/qcoretextfontdatabase.mm            | 8 ++++----
 .../fontdatabases/mac/qcoretextfontdatabase_p.h           | 2 +-
 .../qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp     | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/corelib/codecs/qtextcodec_p.h b/src/corelib/codecs/qtextcodec_p.h
index 0fec1e80c7a..00c067821e9 100644
--- a/src/corelib/codecs/qtextcodec_p.h
+++ b/src/corelib/codecs/qtextcodec_p.h
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
 
 #ifndef QT_NO_TEXTCODEC
 
-#if defined(Q_OS_MAC) || defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX)
+#if defined(Q_OS_MAC) || defined(Q_OS_ANDROID) || defined(Q_OS_QNX)
 #define QT_LOCALE_IS_UTF8
 #endif
 
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index e6da7bb32d3..eb0455c31e4 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -1694,7 +1694,7 @@ Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
 
 QSysInfo::MacVersion QSysInfo::macVersion()
 {
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
     SInt32 gestalt_version;
     if (Gestalt(gestaltSystemVersion, &gestalt_version) == noErr) {
         return QSysInfo::MacVersion(((gestalt_version & 0x00F0) >> 4) + 2);
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index 4211a23e0fd..f0899c6dee5 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -65,7 +65,7 @@
 
 #include "qglobal.h"
 
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
 #include <CoreServices/CoreServices.h>
 #endif
 
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index be9b946990b..6a911937855 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -83,9 +83,9 @@
 #   define old_qDebug qDebug
 #   undef qDebug
 # endif
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
 # include <CoreServices/CoreServices.h>
-#endif //Q_OS_IOS
+#endif // Q_OS_MACX
 
 # ifdef old_qDebug
 #   undef qDebug
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index fbd836f7633..1e15a9e62c6 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -41,7 +41,7 @@
 
 #include "qglobal.h"
 
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
 #import <Cocoa/Cocoa.h>
 #import <IOKit/graphics/IOGraphicsLib.h>
 #endif
@@ -107,7 +107,7 @@ static NSInteger languageMapSort(id obj1, id obj2, void *context)
 
 QCoreTextFontDatabase::QCoreTextFontDatabase()
 {
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
     QSettings appleSettings(QLatin1String("apple.com"));
     QVariant appleValue = appleSettings.value(QLatin1String("AppleAntiAliasingThreshold"));
     if (appleValue.isValid())
@@ -408,7 +408,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
 
     static bool didPopulateStyleFallbacks = false;
     if (!didPopulateStyleFallbacks) {
-#if !defined(Q_OS_IOS)
+#if defined(Q_OS_MACX)
         // Ensure we have the psNameToFamily mapping set up
         const_cast<QCoreTextFontDatabase*>(this)->populateFontDatabase();
 
@@ -457,7 +457,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
     return fallbackLists[styleLookupKey.arg(styleHint)];
 }
 
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
 QStringList QCoreTextFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName)
 {
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
index 5b9b8e23299..8536ad91232 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
@@ -55,7 +55,7 @@ public:
     QFontEngine *fontEngine(const QFontDef &fontDef, QChar::Script script, void *handle);
     QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference);
     QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const;
-#ifndef Q_OS_IOS
+#ifdef Q_OS_MACX
     QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName);
 #endif
     void releaseHandle(void *handle);
diff --git a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
index dd24f6757e4..9e03884e4e7 100644
--- a/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
+++ b/tests/auto/network/kernel/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
@@ -380,7 +380,7 @@ void tst_QNetworkProxyFactory::genericSystemProxy()
     QFETCH(int, port);
 
 // The generic system proxy is only available on the following platforms
-#if (!defined Q_OS_BLACKBERRY) && (!defined Q_OS_WIN) && ((!defined Q_OS_MAC) || defined Q_OS_IOS)
+#if (!defined Q_OS_BLACKBERRY) && (!defined Q_OS_WIN) && (!defined Q_OS_MACX)
     qputenv(envVar, url);
     const QList<QNetworkProxy> systemProxy = QNetworkProxyFactory::systemProxyForQuery();
     QCOMPARE(systemProxy.size(), 1);
-- 
GitLab