corelib: Remove Q_WS-macros.

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>
This commit is contained in:
Friedemann Kleint 2011-10-21 09:55:40 +02:00 committed by Qt by Nokia
parent ccf27301e0
commit 1d01bc1e83
24 changed files with 44 additions and 250 deletions

View 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)

View 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

View 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
@ -1118,51 +1118,6 @@ bool qSharedBuild()
\sa SymbianVersion, WinVersion, MacVersion
*/
/*!
\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>
@ -1170,27 +1125,6 @@ bool qSharedBuild()
Defined on Darwin OS (synonym for Q_OS_MAC).
*/
/*!
\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>
@ -1520,15 +1454,6 @@ bool qSharedBuild()
Defined on Symbian.
*/
/*!
\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"

View 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;

View 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;

View File

@ -139,7 +139,7 @@
#define CLEARTYPE_QUALITY 5
#endif
#ifdef Q_WS_WINCE
#ifdef Q_OS_WINCE
#ifndef LR_DEFAULTSIZE
#define LR_DEFAULTSIZE 0
#endif

View 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

View 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;

View 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(); }

View 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,

View 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;
}

View 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

View 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:/";

View 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 {

View 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

View File

@ -82,7 +82,7 @@ wince*: {
kernel/qfunctions_wince.h
}
mac:!embedded:!qpa{
mac {
SOURCES += \
kernel/qcoreapplication_mac.cpp
}

View 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);

View 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.");

View 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);

View 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

View 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)

View 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

View 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;

View 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