summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOlli Werwolff <qt-info@nokia.com>2011-05-24 09:14:43 +0200
committerOlli Werwolff <qt-info@nokia.com>2011-05-24 09:20:50 +0200
commitf86334a0155ad38138a012c7f9e54c25206abebd (patch)
tree117a838973bfd315f0e946b9064dda1b5d9b533f /src/corelib
parent6a3dce19957535d9b9b7311a487469ed7566ac25 (diff)
Make QtCore compile with on Windows when -qpa is used
Core functionality almost never is window system dependent. Reviewed-by: Friedemann Kleint
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qglobal.h12
-rw-r--r--src/corelib/global/qt_pch.h2
-rw-r--r--src/corelib/io/qdir.cpp2
-rw-r--r--src/corelib/io/qfsfileengine_p.h4
-rw-r--r--src/corelib/io/qprocess.cpp6
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp6
-rw-r--r--src/corelib/kernel/qcoreapplication.h6
-rw-r--r--src/corelib/kernel/qcoreapplication_win.cpp2
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp2
-rw-r--r--src/corelib/plugin/qlibrary_p.h4
-rw-r--r--src/corelib/thread/qthread.cpp4
-rw-r--r--src/corelib/tools/qdatetime.cpp4
-rw-r--r--src/corelib/tools/qlocale.cpp2
13 files changed, 29 insertions, 27 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index a16bf2599d..2745f761b5 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -856,7 +856,9 @@ namespace QT_NAMESPACE {}
WIN16 - unsupported
*/
-#if defined(Q_OS_MSDOS)
+#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_)
@@ -1139,7 +1141,7 @@ redefine to built-in booleans to make autotests work properly */
//defines the type for the WNDPROC on windows
//the alignment needs to be forced for sse2 to not crash with mingw
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
# if defined(Q_CC_MINGW)
# define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer))
# else
@@ -1560,7 +1562,7 @@ public:
#else
# error "Qt not configured correctly, please run configure"
#endif
-#if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN)
+#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN)
enum WinVersion {
WV_32s = 0x0001,
WV_95 = 0x0002,
@@ -1669,7 +1671,7 @@ inline QT3_SUPPORT bool qSysInfo(int *wordSize, bool *bigEndian)
}
#endif
-#if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN)
+#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN)
#if defined(QT3_SUPPORT)
inline QT3_SUPPORT bool qt_winUnicode() { return true; }
inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; }
@@ -1679,7 +1681,7 @@ inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; }
#define QT_WA(unicode, ansi) unicode
#define QT_WA_INLINE(unicode, ansi) (unicode)
-#endif /* Q_WS_WIN */
+#endif /* Q_OS_WIN */
#ifndef Q_OUTOFLINE_TEMPLATE
# define Q_OUTOFLINE_TEMPLATE
diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h
index 8a1004d1cb..2a2e980b22 100644
--- a/src/corelib/global/qt_pch.h
+++ b/src/corelib/global/qt_pch.h
@@ -50,7 +50,7 @@
#if defined __cplusplus
#include <qglobal.h>
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
# define _POSIX_
# include <limits.h>
# undef _POSIX_
diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp
index 166513a6ff..cc744fc865 100644
--- a/src/corelib/io/qdir.cpp
+++ b/src/corelib/io/qdir.cpp
@@ -1746,7 +1746,7 @@ QFileInfoList QDir::drives()
*/
QChar QDir::separator()
{
-#if defined (Q_FS_FAT) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined (Q_FS_FAT) || defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
return QLatin1Char('\\');
#elif defined(Q_OS_UNIX)
return QLatin1Char('/');
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 253f461fd1..ae5a1f34b8 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -77,7 +77,7 @@ class Q_AUTOTEST_EXPORT QFSFileEnginePrivate : public QAbstractFileEnginePrivate
Q_DECLARE_PUBLIC(QFSFileEngine)
public:
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
static QString longFileName(const QString &path);
#endif
@@ -143,7 +143,7 @@ public:
int getMapHandle();
#endif
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
HANDLE fileHandle;
HANDLE mapHandle;
QHash<uchar *, DWORD /* offset % AllocationGranularity */> maps;
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index c2234e9667..b66d74d44a 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -93,7 +93,7 @@ QT_END_NAMESPACE
#include <qsocketnotifier.h>
#include <qtimer.h>
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
#include <private/qwineventnotifier_p.h>
#endif
@@ -764,10 +764,10 @@ QProcessPrivate::QProcessPrivate()
dying = false;
emittedReadyRead = false;
emittedBytesWritten = false;
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
pipeWriter = 0;
processFinishedNotifier = 0;
-#endif // Q_WS_WIN
+#endif // Q_OS_WIN
#ifdef Q_OS_UNIX
serial = 0;
#endif
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index c323d44de7..16f5e33bc0 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -171,7 +171,7 @@ CApaCommandLine* QCoreApplicationPrivate::symbianCommandLine()
#endif
-#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
+#if defined(Q_OS_WIN) || defined(Q_WS_MAC)
extern QString qAppFileName();
#endif
@@ -1285,7 +1285,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event, int priority)
*/
bool QCoreApplication::compressEvent(QEvent *event, QObject *receiver, QPostEventList *postedEvents)
{
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
Q_ASSERT(event);
Q_ASSERT(receiver);
Q_ASSERT(postedEvents);
@@ -1991,7 +1991,7 @@ QString QCoreApplication::applicationFilePath()
if (!d->cachedApplicationFilePath.isNull())
return d->cachedApplicationFilePath;
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
d->cachedApplicationFilePath = QFileInfo(qAppFileName()).filePath();
return d->cachedApplicationFilePath;
#elif defined(Q_WS_MAC)
diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h
index 929e4a9836..8bb087bf0c 100644
--- a/src/corelib/kernel/qcoreapplication.h
+++ b/src/corelib/kernel/qcoreapplication.h
@@ -50,7 +50,7 @@
#include <QtCore/qstringlist.h>
#endif
-#if defined(Q_WS_WIN) && !defined(tagMSG)
+#if defined(Q_OS_WIN) && !defined(tagMSG)
typedef struct tagMSG MSG;
#endif
@@ -168,7 +168,7 @@ public:
static QT3_SUPPORT int loopLevel();
#endif
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
virtual bool winEventFilter(MSG *message, long *result);
#endif
@@ -280,7 +280,7 @@ Q_CORE_EXPORT void qAddPostRoutine(QtCleanUpFunction);
Q_CORE_EXPORT void qRemovePostRoutine(QtCleanUpFunction);
Q_CORE_EXPORT QString qAppName(); // get application name
-#if defined(Q_WS_WIN) && !defined(QT_NO_DEBUG_STREAM)
+#if defined(Q_OS_WIN) && !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT QString decodeMSG(const MSG &);
Q_CORE_EXPORT QDebug operator<<(QDebug, const MSG &);
#endif
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp
index a6f43a8900..d98d6a00f9 100644
--- a/src/corelib/kernel/qcoreapplication_win.cpp
+++ b/src/corelib/kernel/qcoreapplication_win.cpp
@@ -240,7 +240,7 @@ void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerI
}
}
-#if defined(Q_WS_WIN) && !defined(QT_NO_DEBUG_STREAM)
+#if defined(Q_OS_WIN) && !defined(QT_NO_DEBUG_STREAM)
/*****************************************************************************
Convenience functions for convert WM_* messages into human readable strings,
including a nifty QDebug operator<< for simpel QDebug() << msg output.
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 6badb6a2f8..16e0b90573 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -306,7 +306,7 @@ public:
typedef QList<WinTimerInfo*> WinTimerVec; // vector of TimerInfo structs
typedef QHash<int, WinTimerInfo*> WinTimerDict; // fast dict of timers
-#if !defined(DWORD_PTR) && !defined(Q_WS_WIN64)
+#if !defined(DWORD_PTR) && !defined(Q_OS_WIN64)
#define DWORD_PTR DWORD
#endif
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index e2e16d9bc2..43bc9dee3a 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
# include "QtCore/qt_windows.h"
#endif
#include "QtCore/qlibrary.h"
@@ -73,7 +73,7 @@ class QLibraryPrivate
{
public:
-#ifdef Q_WS_WIN
+#ifdef Q_OS_WIN
HINSTANCE
#else
void *
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index aaa1e6dc36..d51f89c440 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -176,12 +176,12 @@ QThreadPrivate::QThreadPrivate(QThreadData *d)
{
#if defined (Q_OS_UNIX)
thread_id = 0;
-#elif defined (Q_WS_WIN)
+#elif defined (Q_OS_WIN)
handle = 0;
id = 0;
waiters = 0;
#endif
-#if defined (Q_WS_WIN) || defined (Q_OS_SYMBIAN)
+#if defined (Q_OS_WIN) || defined (Q_OS_SYMBIAN)
terminationEnabled = true;
terminatePending = false;
#endif
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index d9a054ae77..b93014cfd4 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -51,7 +51,7 @@
#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
#include <qt_windows.h>
#endif
-#ifndef Q_WS_WIN
+#ifndef Q_OS_WIN
#include <locale.h>
#endif
@@ -2519,7 +2519,7 @@ QString QDateTime::toString(Qt::DateFormat f) const
}
#ifndef QT_NO_TEXTDATE
else if (f == Qt::TextDate) {
-#ifndef Q_WS_WIN
+#ifndef Q_OS_WIN
buf = d->date.shortDayName(d->date.dayOfWeek());
buf += QLatin1Char(' ');
buf += d->date.shortMonthName(d->date.month());
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 59dd3f511d..a060b74979 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -66,7 +66,7 @@ QT_END_NAMESPACE
#include "qstringlist.h"
#include "qvariant.h"
#include "qstringbuilder.h"
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
# include "qt_windows.h"
# include <time.h>
#endif