corelib: Remove Q_WS-macros.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Fri, 21 Oct 2011 07:55:40 +0000 (09:55 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 24 Oct 2011 09:04:04 +0000 (11:04 +0200)
Q_WS_QPA is the only active code path after merging
refactor, other Q_WS-macros are no longer used.

Enable compilation without -qpa.

- Remove Q_OS_MSDOS, Q_OS_OS2
- Remove Q_WS_QWS
- Remove/replace definitions/conditionals of Q_WS_XX
- Remove qpa branches from profiles
- Replace Q_WS_MAC by  Q_OS_MAC
- Replace Q_WS_MAC && !Q_WS_QPA by
  Q_OS_MAC && !QT_NO_CORESERVICES
- Similarly in profiles: mac:contains(QT_CONFIG, coreservices)
- Replace Q_FS_FAT by Q_OS_WIN

Change-Id: Icce5a6c55b052c8f72b3b979ddf31a4f388ea9c9
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
24 files changed:
src/corelib/codecs/qtextcodec.cpp
src/corelib/corelib.pro
src/corelib/global/qglobal.cpp
src/corelib/global/qglobal.h
src/corelib/global/qnamespace.h
src/corelib/global/qt_windows.h
src/corelib/io/qdir.cpp
src/corelib/io/qfilesystemengine.cpp
src/corelib/io/qfilesystemengine_p.h
src/corelib/io/qfilesystemengine_unix.cpp
src/corelib/io/qfilesystemengine_win.cpp
src/corelib/io/qfilesystemmetadata_p.h
src/corelib/io/qfsfileengine_win.cpp
src/corelib/io/qsettings.cpp
src/corelib/io/qsettings_p.h
src/corelib/kernel/kernel.pri
src/corelib/kernel/qcoreapplication.cpp
src/corelib/kernel/qobject.cpp
src/corelib/plugin/qfactoryloader.cpp
src/corelib/plugin/qfactoryloader_p.h
src/corelib/thread/qthread_unix.cpp
src/corelib/tools/qdatetime.cpp
src/corelib/tools/qrect.h
src/corelib/tools/qstring.cpp

index f28133b..42fac98 100644 (file)
@@ -74,7 +74,7 @@
 #    include "../../plugins/codecs/kr/qeuckrcodec.h"
 #    include "../../plugins/codecs/tw/qbig5codec.h"
 #  endif // QT_NO_ICONV
-#  if defined(Q_WS_X11) && !defined(QT_BOOTSTRAPPED)
+#  if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED)
 #    include "qfontlaocodec_p.h"
 #    include "../../plugins/codecs/jp/qfontjpcodec.h"
 #  endif
@@ -756,7 +756,7 @@ static void setup()
     localeMapper = QSymbianTextCodec::init();
 #endif
 
-#  if defined(Q_WS_X11) && !defined(QT_BOOTSTRAPPED)
+#  if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED)
     // no font codecs when bootstrapping
     (void)new QFontLaoCodec;
 #    if defined(QT_NO_ICONV)
@@ -770,7 +770,7 @@ static void setup()
     (void)new QFontBig5hkscsCodec;
     (void)new QFontBig5Codec;
 #    endif // QT_NO_ICONV && !QT_BOOTSTRAPPED
-#  endif // Q_WS_X11
+#  endif // Q_OS_UNIX
 
 
 #if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_INTEGRITY)
index 2388f53..edb5ecb 100644 (file)
@@ -29,13 +29,12 @@ include(codecs/codecs.pri)
 include(statemachine/statemachine.pri)
 include(xml/xml.pri)
 
-!qpa:mac|darwin:LIBS_PRIVATE += -framework ApplicationServices
-qpa {
+mac|darwin {
     contains(QT_CONFIG, coreservices) {
+        LIBS_PRIVATE += -framework ApplicationServices
         LIBS_PRIVATE += -framework CoreServices
     }
-} else:mac|darwin {
-        LIBS_PRIVATE += -framework CoreFoundation
+    LIBS_PRIVATE += -framework CoreFoundation
 }
 mac:lib_bundle:DEFINES += QT_NO_DEBUG_PLUGIN_CHECK
 win32:DEFINES-=QT_NO_CAST_TO_ASCII
index 452679c..453c4a9 100644 (file)
@@ -933,7 +933,7 @@ bool qSharedBuild()
     \endlist
 
     Some constants are defined only on certain platforms. You can use
-    the preprocessor symbols Q_WS_WIN and Q_WS_MAC to test that
+    the preprocessor symbols Q_OS_WIN and Q_OS_MAC to test that
     the application is compiled under Windows or Mac.
 
     \sa QLibraryInfo
@@ -1119,51 +1119,6 @@ bool qSharedBuild()
 */
 
 /*!
-    \macro Q_WS_MAC
-    \relates <QtGlobal>
-
-    Defined on Mac OS X.
-
-    \sa Q_WS_WIN, Q_WS_X11, Q_WS_QWS, Q_WS_QPA, Q_WS_S60
-*/
-
-/*!
-    \macro Q_WS_WIN
-    \relates <QtGlobal>
-
-    Defined on Windows.
-
-    \sa Q_WS_MAC, Q_WS_X11, Q_WS_QWS, Q_WS_QPA, Q_WS_S60
-*/
-
-/*!
-    \macro Q_WS_X11
-    \relates <QtGlobal>
-
-    Defined on X11.
-
-    \sa Q_WS_MAC, Q_WS_WIN, Q_WS_QWS, Q_WS_QPA, Q_WS_S60
-*/
-
-/*!
-    \macro Q_WS_QWS
-    \relates <QtGlobal>
-
-    Defined on Qt for Embedded Linux.
-
-    \sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_QPA, Q_WS_S60
-*/
-
-/*!
-    \macro Q_WS_QPA
-    \relates <QtGlobal>
-
-    Defined on Qt for Embedded Linux, Lite version.
-
-    \sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_QWS, Q_WS_S60
-*/
-
-/*!
     \macro Q_OS_DARWIN
     \relates <QtGlobal>
 
@@ -1171,27 +1126,6 @@ bool qSharedBuild()
 */
 
 /*!
-    \macro Q_OS_MSDOS
-    \relates <QtGlobal>
-
-    Defined on MS-DOS and Windows.
-*/
-
-/*!
-    \macro Q_OS_OS2
-    \relates <QtGlobal>
-
-    Defined on OS/2.
-*/
-
-/*!
-    \macro Q_OS_OS2EMX
-    \relates <QtGlobal>
-
-    Defined on XFree86 on OS/2 (not PM).
-*/
-
-/*!
     \macro Q_OS_WIN32
     \relates <QtGlobal>
 
@@ -1521,15 +1455,6 @@ bool qSharedBuild()
  */
 
 /*!
-  \macro Q_WS_S60
-  \relates <QtGlobal>
-
-  Defined on S60 with the Avkon UI framework.
-
-  \sa Q_WS_MAC, Q_WS_WIN, Q_WS_X11, Q_WS_QWS
- */
-
-/*!
   \macro QT_DISABLE_DEPRECATED_BEFORE
   \relates <QtGlobal>
 
@@ -1550,7 +1475,7 @@ static const unsigned int qt_one = 1;
 const int QSysInfo::ByteOrder = ((*((unsigned char *) &qt_one) == 0) ? BigEndian : LittleEndian);
 #endif
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
 
 QT_BEGIN_INCLUDE_NAMESPACE
 #include "private/qcore_mac_p.h"
@@ -1562,51 +1487,19 @@ Q_CORE_EXPORT OSErr qt_mac_create_fsref(const QString &file, FSRef *fsref)
     return FSPathMakeRef(reinterpret_cast<const UInt8 *>(file.toUtf8().constData()), fsref, 0);
 }
 
-// Don't use this function, it won't work in 10.5 (Leopard) and up
-Q_CORE_EXPORT OSErr qt_mac_create_fsspec(const QString &file, FSSpec *spec)
-{
-    FSRef fsref;
-    OSErr ret = qt_mac_create_fsref(file, &fsref);
-    if (ret == noErr)
-        ret = FSGetCatalogInfo(&fsref, kFSCatInfoNone, 0, 0, spec, 0);
-    return ret;
-}
-
 Q_CORE_EXPORT void qt_mac_to_pascal_string(QString s, Str255 str, TextEncoding encoding=0, int len=-1)
 {
-    if(len == -1)
-        len = s.length();
-#if 0
-    UnicodeMapping mapping;
-    mapping.unicodeEncoding = CreateTextEncoding(kTextEncodingUnicodeDefault,
-                                                 kTextEncodingDefaultVariant,
-                                                 kUnicode16BitFormat);
-    mapping.otherEncoding = (encoding ? encoding : );
-    mapping.mappingVersion = kUnicodeUseLatestMapping;
-
-    UnicodeToTextInfo info;
-    OSStatus err = CreateUnicodeToTextInfo(&mapping, &info);
-    if(err != noErr) {
-        qDebug("Qt: internal: Unable to create pascal string '%s'::%d [%ld]",
-               s.left(len).latin1(), (int)encoding, err);
-        return;
-    }
-    const int unilen = len * 2;
-    const UniChar *unibuf = (UniChar *)s.unicode();
-    ConvertFromUnicodeToPString(info, unilen, unibuf, str);
-    DisposeUnicodeToTextInfo(&info);
-#else
     Q_UNUSED(encoding);
+    Q_UNUSED(len);
     CFStringGetPascalString(QCFString(s), str, 256, CFStringGetSystemEncoding());
-#endif
 }
 
 Q_CORE_EXPORT QString qt_mac_from_pascal_string(const Str255 pstr) {
     return QCFString(CFStringCreateWithPascalString(0, pstr, CFStringGetSystemEncoding()));
 }
-#endif //!defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#endif // defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
 
-#if !defined(QWS) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC)
 
 static QSysInfo::MacVersion macVersion()
 {
@@ -1620,7 +1513,7 @@ static QSysInfo::MacVersion macVersion()
 }
 const QSysInfo::MacVersion QSysInfo::MacintoshVersion = macVersion();
 
-#elif defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINCE)
+#elif defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINCE)
 
 QT_BEGIN_INCLUDE_NAMESPACE
 #include "qt_windows.h"
index d72de75..9780c2f 100644 (file)
@@ -210,14 +210,6 @@ namespace QT_NAMESPACE {}
 #  define QT_NO_GETIFADDRS
 #elif defined(__CYGWIN__)
 #  define Q_OS_CYGWIN
-#elif defined(MSDOS) || defined(_MSDOS)
-#  define Q_OS_MSDOS
-#elif defined(__OS2__)
-#  if defined(__EMX__)
-#    define Q_OS_OS2EMX
-#  else
-#    define Q_OS_OS2
-#  endif
 #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
 #  define Q_OS_WIN32
 #  define Q_OS_WIN64
@@ -298,7 +290,7 @@ namespace QT_NAMESPACE {}
 #  endif
 #endif
 
-#if defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
+#if defined(Q_OS_WIN)
 #  undef Q_OS_UNIX
 #elif !defined(Q_OS_UNIX)
 #  define Q_OS_UNIX
@@ -854,54 +846,6 @@ namespace QT_NAMESPACE {}
 #  endif
 #endif
 
-/*
-   The window system, must be one of: (Q_WS_x)
-
-     MACX     - Mac OS X
-     MAC9     - Mac OS 9
-     QWS      - Qt for Embedded Linux
-     WIN32    - Windows
-     X11      - X Window System
-     S60      - Symbian S60
-     PM       - unsupported
-     WIN16    - unsupported
-*/
-
-#if defined (Q_WS_QPA)
-
-#elif defined(Q_OS_MSDOS)
-#  define Q_WS_WIN16
-#  error "Qt requires Win32 and does not work with Windows 3.x"
-#elif defined(_WIN32_X11_)
-#  define Q_WS_X11
-#elif defined(Q_OS_WIN32)
-#  define Q_WS_WIN32
-#  if defined(Q_OS_WIN64)
-#    define Q_WS_WIN64
-#  endif
-#elif defined(Q_OS_WINCE)
-#  define Q_WS_WIN32
-#  define Q_WS_WINCE
-#  if defined(Q_OS_WINCE_WM)
-#    define Q_WS_WINCE_WM
-#  endif
-#elif defined(Q_OS_OS2)
-#  define Q_WS_PM
-#  error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
-#elif defined(Q_OS_UNIX)
-#  if defined(Q_OS_SYMBIAN)
-#    if !defined(QT_NO_S60)
-#      define Q_WS_S60
-#    endif
-#  elif !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
-#    define Q_WS_X11
-#  endif
-#endif
-
-#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) || defined(Q_WS_WINCE)
-#  define Q_WS_WIN
-#endif
-
 QT_BEGIN_HEADER
 QT_BEGIN_NAMESPACE
 
@@ -1186,13 +1130,7 @@ Q_DECL_CONSTEXPR inline const T &qBound(const T &min, const T &val, const T &max
 
 class QDataStream;
 
-#if defined(Q_WS_MAC)
-#  ifndef QMAC_QMENUBAR_NO_EVENT
-#    define QMAC_QMENUBAR_NO_EVENT
-#  endif
-#endif
-
-#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
+#if !defined(QT_NO_COP)
 #  define QT_NO_COP
 #endif
 
@@ -2730,12 +2668,6 @@ QT_LICENSED_MODULE(DBus)
 #  endif
 #endif
 
-#if !(defined(Q_WS_WIN) && !defined(Q_WS_WINCE)) \
-    && !(defined(Q_WS_X11) && !defined(QT_NO_FREETYPE)) \
-    && !(defined(Q_WS_QPA))
-#  define QT_NO_RAWFONT
-#endif
-
 namespace QtPrivate {
 //like std::enable_if
 template <bool B, typename T = void> struct QEnableIf;
index 01de680..ce842f3 100644 (file)
@@ -1395,16 +1395,10 @@ public:
     };
     Q_DECLARE_FLAGS(MatchFlags, MatchFlag)
 
-#if defined(Q_WS_MAC)
-    typedef void * HANDLE;
-#elif defined(Q_WS_WIN)
-    typedef void *HANDLE;
-#elif defined(Q_WS_X11)
-    typedef unsigned long HANDLE;
-#elif defined(Q_WS_QWS) || defined(Q_WS_QPA)
-    typedef void * HANDLE;
-#elif defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN)
     typedef unsigned long int HANDLE; // equivalent to TUint32
+#else
+    typedef void * HANDLE;
 #endif
     typedef WindowFlags WFlags;
 
index d0bde31..ba4041e 100644 (file)
 #define CLEARTYPE_QUALITY 5
 #endif
 
-#ifdef Q_WS_WINCE
+#ifdef Q_OS_WINCE
 #ifndef LR_DEFAULTSIZE
 #define LR_DEFAULTSIZE 0
 #endif
index 68da628..e7fdc4a 100644 (file)
@@ -794,7 +794,7 @@ QString QDir::convertSeparators(const QString &pathName)
 */
 QString QDir::toNativeSeparators(const QString &pathName)
 {
-#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
     int i = pathName.indexOf(QLatin1Char('/'));
     if (i != -1) {
         QString n(pathName);
@@ -827,7 +827,7 @@ QString QDir::toNativeSeparators(const QString &pathName)
 */
 QString QDir::fromNativeSeparators(const QString &pathName)
 {
-#if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
     int i = pathName.indexOf(QLatin1Char('\\'));
     if (i != -1) {
         QString n(pathName);
@@ -1763,12 +1763,8 @@ QFileInfoList QDir::drives()
 */
 QChar QDir::separator()
 {
-#if defined (Q_FS_FAT) || defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
     return QLatin1Char('\\');
-#elif defined(Q_OS_UNIX)
-    return QLatin1Char('/');
-#elif defined (Q_OS_MAC)
-    return QLatin1Char(':');
 #else
     return QLatin1Char('/');
 #endif
index 97669ac..72900ec 100644 (file)
@@ -267,7 +267,7 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer)
     // Attributes
     entryFlags |= QFileSystemMetaData::ExistsAttribute;
     size_ = statBuffer.st_size;
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC) \
+#if defined (Q_OS_MAC) && !defined(QT_NO_CORESERVICES) \
         && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
     if (statBuffer.st_flags & UF_HIDDEN) {
         entryFlags |= QFileSystemMetaData::HiddenAttribute;
index 96a2019..bbd4c4c 100644 (file)
@@ -76,7 +76,7 @@ public:
     static QString resolveGroupName(uint groupId);
 #endif
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
     static QString bundleName(const QFileSystemEntry &entry);
 #else
     static QString bundleName(const QFileSystemEntry &entry) { Q_UNUSED(entry) return QString(); }
index 966daba..acc8c2c 100644 (file)
@@ -59,7 +59,7 @@
 
 QT_BEGIN_NAMESPACE
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
 static inline bool _q_isMacHidden(const char *nativePath)
 {
     OSErr err;
@@ -148,7 +148,7 @@ QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link,
             ret.chop(1);
         return QFileSystemEntry(ret);
     }
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
     {
         FSRef fref;
         if (FSPathMakeRef((const UInt8 *)QFile::encodeName(QDir::cleanPath(link.filePath())).data(), &fref, 0) == noErr) {
@@ -305,7 +305,7 @@ QString QFileSystemEngine::resolveGroupName(uint groupId)
     return QString();
 }
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
 //static
 QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
 {
@@ -325,20 +325,18 @@ QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry)
 bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
         QFileSystemMetaData::MetaDataFlags what)
 {
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
     if (what & QFileSystemMetaData::BundleType) {
         if (!data.hasFlags(QFileSystemMetaData::DirectoryType))
             what |= QFileSystemMetaData::DirectoryType;
     }
-#endif
-
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC) \
-        && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#    if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
     if (what & QFileSystemMetaData::HiddenAttribute) {
         // Mac OS >= 10.5: st_flags & UF_HIDDEN
         what |= QFileSystemMetaData::PosixStatFlags;
     }
-#endif
+#   endif // MAC_OS_X_VERSION_MAX_ALLOWED...
+#endif // defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
 
     if (what & QFileSystemMetaData::PosixStatFlags)
         what |= QFileSystemMetaData::PosixStatFlags;
@@ -399,7 +397,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
             | QFileSystemMetaData::ExistsAttribute;
     }
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
     if (what & QFileSystemMetaData::AliasType)
     {
         if (entryExists) {
@@ -445,7 +443,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
         data.knownFlagsMask |= QFileSystemMetaData::HiddenAttribute;
     }
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
     if (what & QFileSystemMetaData::BundleType) {
         if (entryExists && data.isDirectory()) {
             QCFType<CFStringRef> path = CFStringCreateWithBytes(0,
index 3296bab..9907ee8 100644 (file)
@@ -975,15 +975,11 @@ QString QFileSystemEngine::rootPath()
 {
 #if defined(Q_OS_WINCE)
     QString ret = QLatin1String("/");
-#elif defined(Q_FS_FAT)
+#else
     QString ret = QString::fromLatin1(qgetenv("SystemDrive").constData());
     if (ret.isEmpty())
         ret = QLatin1String("c:");
     ret.append(QLatin1Char('/'));
-#elif defined(Q_OS_OS2EMX)
-    char dir[4];
-    _abspath(dir, QLatin1String("/"), _MAX_PATH);
-    QString ret(dir);
 #endif
     return ret;
 }
index de5b003..64749e3 100644 (file)
@@ -106,7 +106,7 @@ public:
 #endif
         FileType            = 0x00020000,
         DirectoryType       = 0x00040000,
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
         BundleType          = 0x00080000,
         AliasType           = 0x08000000,
 #else
@@ -266,7 +266,7 @@ private:
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(QFileSystemMetaData::MetaDataFlags)
 
-#if !defined(QWS) && !defined(Q_WS_QPA) && defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
 inline bool QFileSystemMetaData::isBundle() const                   { return (entryFlags & BundleType); }
 inline bool QFileSystemMetaData::isAlias() const                    { return (entryFlags & AliasType); }
 #else
index 8578402..f2b3e5f 100644 (file)
@@ -575,11 +575,6 @@ QFileInfoList QFSFileEngine::drives()
 #if !defined(Q_OS_WINCE)
 #if defined(Q_OS_WIN32)
     quint32 driveBits = (quint32) GetLogicalDrives() & 0x3ffffff;
-#elif defined(Q_OS_OS2EMX)
-    quint32 driveBits, cur;
-    if (DosQueryCurrentDisk(&cur, &driveBits) != NO_ERROR)
-        exit(1);
-    driveBits &= 0x3ffffff;
 #endif
     char driveName[] = "A:/";
 
index 6d3fbfb..37bd8c4 100644 (file)
@@ -1102,11 +1102,7 @@ static void initDefaultPaths(QMutexLocker *locker)
         if (env == 0) {
             userPath = homePath;
             userPath += QLatin1Char('/');
-#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
-            userPath += QLatin1String("Settings");
-#else
             userPath += QLatin1String(".config");
-#endif
         } else if (*env == '/') {
             userPath = QFile::decodeName(env);
         } else {
index a87acc2..5d62c83 100644 (file)
@@ -70,9 +70,7 @@
 
 QT_BEGIN_NAMESPACE
 
-#if defined(Q_WS_QWS) || defined(Q_WS_QPA)
 #define QT_QSETTINGS_ALWAYS_CASE_SENSITIVE_AND_FORGET_ORIGINAL_KEY_ORDER
-#endif
 
 // used in testing framework
 #define QSETTINGS_P_H_VERSION 3
index aa8513f..354bb4a 100644 (file)
@@ -82,7 +82,7 @@ wince*: {
                 kernel/qfunctions_wince.h
 }
 
-mac:!embedded:!qpa{
+mac {
     SOURCES += \
         kernel/qcoreapplication_mac.cpp
 }
index 24d0cee..f7d1d3d 100644 (file)
@@ -172,7 +172,7 @@ CApaCommandLine* QCoreApplicationPrivate::symbianCommandLine()
 
 #endif
 
-#if defined(Q_OS_WIN) || defined(Q_WS_MAC)
+#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
 extern QString qAppFileName();
 #endif
 
@@ -1968,7 +1968,7 @@ QString QCoreApplication::applicationFilePath()
 #if defined(Q_OS_WIN)
     d->cachedApplicationFilePath = QFileInfo(qAppFileName()).filePath();
     return d->cachedApplicationFilePath;
-#elif defined(Q_WS_MAC)
+#elif defined(Q_OS_MAC)
     QString qAppFileName_str = qAppFileName();
     if(!qAppFileName_str.isEmpty()) {
         QFileInfo fi(qAppFileName_str);
index 6c35a8e..a50d5a9 100644 (file)
@@ -1342,7 +1342,7 @@ void QObject::moveToThread(QThread *targetThread)
                  "Cannot move to target thread (%p)\n",
                  currentData->thread, d->threadData->thread, targetData->thread);
 
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
         qWarning("On Mac OS X, you might be loading two sets of Qt binaries into the same process. "
                  "Check that all plugins are compiled against the right Qt binaries. Export "
                  "DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.");
index c175dcf..749a7de 100644 (file)
@@ -225,7 +225,7 @@ QObject *QFactoryLoader::instance(const QString &key) const
     return 0;
 }
 
-#ifdef Q_WS_X11
+#if defined(Q_OS_UNIX) && !defined (Q_OS_MAC)
 QLibraryPrivate *QFactoryLoader::library(const QString &key) const
 {
     Q_D(const QFactoryLoader);
index e90ebf6..75d40f8 100644 (file)
@@ -77,7 +77,7 @@ public:
     QStringList keys() const;
     QObject *instance(const QString &key) const;
 
-#ifdef Q_WS_X11
+#if defined(Q_OS_UNIX) && !defined (Q_OS_MAC)
     QLibraryPrivate *library(const QString &key) const;
 #endif
 
index 839a396..46bc641 100644 (file)
@@ -361,7 +361,7 @@ int QThread::idealThreadCount()
 {
     int cores = -1;
 
-#if defined(Q_OS_MAC) && !defined(Q_WS_QPA)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
     // Mac OS X
     cores = MPProcessorsScheduled();
 #elif defined(Q_OS_HPUX)
index 3d3bc55..3c8848b 100644 (file)
@@ -69,7 +69,7 @@
 #  define QDTPDEBUGN if (false) qDebug
 #endif
 
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
 #include <private/qcore_mac_p.h>
 #endif
 
index 5d6db98..58221f4 100644 (file)
@@ -146,9 +146,6 @@ public:
     friend Q_CORE_EXPORT_INLINE bool operator!=(const QRect &, const QRect &);
 
 private:
-#if defined(Q_WS_X11)
-    friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2);
-#endif
     // ### Qt 5;  remove the ifdef and just have the same order on all platforms.
 #if defined(Q_OS_MAC)
     int y1;
index 9278c7b..8e31afb 100644 (file)
@@ -3668,7 +3668,7 @@ QByteArray QString::toAscii() const
     return toLatin1();
 }
 
-#if !defined(Q_WS_MAC) && defined(Q_OS_UNIX)
+#if !defined(Q_OS_MAC) && defined(Q_OS_UNIX)
 static QByteArray toLocal8Bit_helper(const QChar *data, int length)
 {
 #ifndef QT_NO_TEXTCODEC