OSDN Git Service

remove some Q_WS_WIN, Q_WS_MAC, Q_CC_MSVC, etc. leftovers
authorIvailo Monev <xakepa10@laimg.moc>
Sun, 11 Sep 2016 17:38:50 +0000 (17:38 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sun, 11 Sep 2016 17:38:50 +0000 (17:38 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
36 files changed:
src/core/concurrent/qtconcurrentcompilertest.h
src/core/global/qglobal.cpp
src/core/global/qglobal.h.cmake
src/core/global/qnamespace.h
src/core/global/qt_pch.h [deleted file]
src/core/global/qt_windows.h [deleted file]
src/core/io/qfsfileengine_p.h
src/core/kernel/qabstractitemmodel.h
src/core/kernel/qcoreapplication.h
src/core/plugin/qlibrary_p.h
src/core/thread/qbasicatomic.h
src/core/thread/qmutex.h
src/core/thread/qreadwritelock.h
src/core/tools/qhash.h
src/core/tools/qlocale.cpp
src/gui/dialogs/qprintdialog.h
src/gui/image/qpixmap.h
src/gui/image/qpixmap_raster_p.h
src/gui/kernel/qaction.h
src/gui/kernel/qapplication.h
src/gui/kernel/qapplication_p.h
src/gui/kernel/qsessionmanager.h
src/gui/painting/qpaintengine.h
src/gui/painting/qpaintengine_raster_p.h
src/gui/painting/qpainter.cpp
src/gui/painting/qprinter.cpp
src/gui/painting/qregion.cpp
src/gui/painting/qregion.h
src/gui/text/qrawfont_p.h
src/gui/widgets/qpushbutton.h
src/gui/widgets/qpushbutton_p.h
src/gui/widgets/qrubberband.cpp
src/tools/designer/mainwindow.cpp
src/tools/designer/qdesigner.cpp
src/tools/uic/driver.cpp
src/tools/uic/uic.cpp

index c57f19c..e8c304f 100644 (file)
@@ -50,11 +50,7 @@ QT_BEGIN_HEADER
 QT_BEGIN_NAMESPACE
 
 
-#if defined (Q_CC_MSVC) && (_MSC_VER < 1300)
-#  define QT_TYPENAME
-#else
-#  define QT_TYPENAME typename
-#endif
+#define QT_TYPENAME typename
 
 namespace QtPrivate {
 
index 8a398f9..5defcd2 100644 (file)
 #  include <exception>
 #endif
 
-#if !defined(Q_OS_WINCE)
-#  include <errno.h>
-#  if defined(Q_CC_MSVC)
-#    include <crtdbg.h>
-#  endif
-#endif
+#include <errno.h>
 
 #if defined(Q_OS_VXWORKS) && defined(_WRS_KERNEL)
 #  include <envLib.h>
@@ -2149,22 +2144,6 @@ void qt_message_output(QtMsgType msgType, const char *buf)
         || (msgType == QtWarningMsg
             && (!qgetenv("QT_FATAL_WARNINGS").isNull())) ) {
 
-#if defined(Q_CC_MSVC) && defined(QT_DEBUG) && defined(_DEBUG) && defined(_CRT_ERROR)
-        // get the current report mode
-        int reportMode = _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_WNDW);
-        _CrtSetReportMode(_CRT_ERROR, reportMode);
-#if !defined(Q_OS_WINCE)
-        int ret = _CrtDbgReport(_CRT_ERROR, __FILE__, __LINE__, QT_VERSION_STR, buf);
-#else
-        int ret = _CrtDbgReportW(_CRT_ERROR, _CRT_WIDE(__FILE__),
-            __LINE__, _CRT_WIDE(QT_VERSION_STR), reinterpret_cast<const wchar_t *> (QString::fromLatin1(buf).utf16()));
-#endif
-        if (ret == 0  && reportMode & _CRTDBG_MODE_WNDW)
-            return; // ignore
-        else if (ret == 1)
-            _CrtDbgBreak();
-#endif
-
 #if   (defined(Q_OS_UNIX) || defined(Q_CC_MINGW))
         abort(); // trap; generates core dump
 #else
index ab4af54..59cc048 100644 (file)
@@ -507,26 +507,6 @@ namespace QT_NAMESPACE {}
 
 #elif defined(__MWERKS__)
 #  define Q_CC_MWERKS
-/* "explicit" recognized since 4.0d1 */
-
-#elif defined(_MSC_VER)
-#  define Q_CC_MSVC
-#  define Q_CC_MSVC_NET
-#  define Q_CANNOT_DELETE_CONSTANT
-#  define Q_OUTOFLINE_TEMPLATE inline
-#  define Q_NO_TEMPLATE_FRIENDS
-#  define Q_ALIGNOF(type) __alignof(type)
-#  define Q_DECL_ALIGN(n) __declspec(align(n))
-/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
-#  if defined(__INTEL_COMPILER)
-#    define Q_CC_INTEL
-#  endif
-/* MSVC does not support SSE/MMX on x64 */
-#  if (defined(Q_CC_MSVC) && defined(_M_X64))
-#    undef QT_HAVE_SSE
-#    undef QT_HAVE_MMX
-#    undef QT_HAVE_3DNOW
-#  endif
 
 #elif defined(__BORLANDC__) || defined(__TURBOC__)
 #  define Q_CC_BOR
@@ -969,22 +949,6 @@ namespace QT_NAMESPACE {}
 #  endif
 #endif
 
-#if defined(Q_CC_MSVC) && !defined(Q_CC_INTEL)
-#  if defined(__cplusplus)
-#    if _MSC_VER >= 1600
-       /* C++11 features supported in VC10 = VC2010: */
-#      define Q_COMPILER_AUTO_FUNCTION
-#      define Q_COMPILER_AUTO_TYPE
-#      define Q_COMPILER_DECLTYPE
-#      define Q_COMPILER_LAMBDA
-#      define Q_COMPILER_RVALUE_REFS
-#      define Q_COMPILER_NULLPTR
-//  MSVC's library has std::initializer_list, but the compiler does not support the braces initialization
-//#      define Q_COMPILER_INITIALIZER_LISTS
-#    endif
-#  endif
-#endif
-
 #ifdef Q_COMPILER_CONSTEXPR
 # define Q_DECL_CONSTEXPR constexpr
 #else
@@ -1190,16 +1154,11 @@ redefine to built-in booleans to make autotests work properly */
 #endif
 
 /*
-   Workaround for static const members on MSVC++.
+   Workaround for static const members on MSVC++. Deprecated.
 */
 
-#if defined(Q_CC_MSVC)
-#  define QT_STATIC_CONST static
-#  define QT_STATIC_CONST_IMPL
-#else
-#  define QT_STATIC_CONST static const
-#  define QT_STATIC_CONST_IMPL const
-#endif
+#define QT_STATIC_CONST static const
+#define QT_STATIC_CONST_IMPL const
 
 /*
    Warnings and errors when using deprecated methods
@@ -1208,12 +1167,6 @@ redefine to built-in booleans to make autotests work properly */
 #  define Q_DECL_DEPRECATED Q_DECL_DEPRECATED
 #elif (defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))) || defined(Q_CC_RVCT)
 #  define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))
-#elif defined(Q_CC_MSVC)
-#  define Q_DECL_DEPRECATED __declspec(deprecated)
-#  if defined (Q_CC_INTEL)
-#    define Q_DECL_VARIABLE_DEPRECATED
-#  else
-#  endif
 #else
 #  define Q_DECL_DEPRECATED
 #endif
@@ -1273,8 +1226,6 @@ redefine to built-in booleans to make autotests work properly */
 #else
 #    define QT_FASTCALL
 #endif
-#  elif defined(Q_CC_MSVC)
-#    define QT_FASTCALL __fastcall
 #  else
 #     define QT_FASTCALL
 #  endif
@@ -1863,8 +1814,6 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; }
 
 #if (defined(Q_CC_GNU) && !defined(Q_OS_SOLARIS)) || defined(Q_CC_HPACC) || defined(Q_CC_DIAB)
 #  define Q_FUNC_INFO __PRETTY_FUNCTION__
-#elif defined(_MSC_VER)
-#  define Q_FUNC_INFO __FUNCSIG__
 #else
 #   if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_INTEGRITY)
 #      define Q_FUNC_INFO __FILE__ "(line number unavailable)"
@@ -2250,30 +2199,14 @@ Q_CORE_EXPORT_INLINE void *qReallocAligned(void *ptr, size_t size, size_t oldsiz
 #if !defined(QT_CC_WARNINGS)
 #  define QT_NO_WARNINGS
 #endif
-#if defined(QT_NO_WARNINGS)
-#  if defined(Q_CC_MSVC)
-#    pragma warning(disable: 4251) /* class 'A' needs to have dll interface for to be used by clients of class 'B'. */
-#    pragma warning(disable: 4244) /* 'conversion' conversion from 'type1' to 'type2', possible loss of data */
-#    pragma warning(disable: 4275) /* non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' */
-#    pragma warning(disable: 4514) /* unreferenced inline/local function has been removed */
-#    pragma warning(disable: 4800) /* 'type' : forcing value to bool 'true' or 'false' (performance warning) */
-#    pragma warning(disable: 4097) /* typedef-name 'identifier1' used as synonym for class-name 'identifier2' */
-#    pragma warning(disable: 4706) /* assignment within conditional expression */
-#    pragma warning(disable: 4786) /* truncating debug info after 255 characters */
-#    pragma warning(disable: 4660) /* template-class specialization 'identifier' is already instantiated */
-#    pragma warning(disable: 4355) /* 'this' : used in base member initializer list */
-#    pragma warning(disable: 4231) /* nonstandard extension used : 'extern' before template explicit instantiation */
-#    pragma warning(disable: 4710) /* function not inlined */
-#    pragma warning(disable: 4530) /* C++ exception handler used, but unwind semantics are not enabled. Specify -GX */
-#  elif defined(Q_CC_BOR)
-#    pragma option -w-inl
-#    pragma option -w-aus
-#    pragma warn -inl
-#    pragma warn -pia
-#    pragma warn -ccc
-#    pragma warn -rch
-#    pragma warn -sig
-#  endif
+#if defined(QT_NO_WARNINGS) && defined(Q_CC_BOR)
+#  pragma option -w-inl
+#  pragma option -w-aus
+#  pragma warn -inl
+#  pragma warn -pia
+#  pragma warn -ccc
+#  pragma warn -rch
+#  pragma warn -sig
 #endif
 
 class Q_CORE_EXPORT QFlag
@@ -2429,7 +2362,7 @@ inline const QForeachContainer<T> *qForeachContainer(const QForeachContainerBase
         for (variable = *qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->i; \
              qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk;           \
              --qForeachContainer(&_container_, true ? 0 : qForeachPointer(container))->brk)
-#endif // MSVC6 || MIPSpro
+#endif // DIAB || MIPSpro
 
 #endif
 
index 44fa3bb..d15b4ed 100644 (file)
@@ -1350,11 +1350,7 @@ 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)
+#if defined(Q_WS_X11)
     typedef unsigned long HANDLE;
 #endif
     typedef WindowFlags WFlags;
diff --git a/src/core/global/qt_pch.h b/src/core/global/qt_pch.h
deleted file mode 100644 (file)
index 4f52763..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- * This is a precompiled header file for use in Xcode / Mac GCC /
- * GCC >= 3.4 / VC to greatly speed the building of Qt. It may also be
- * of use to people developing their own project, but it is probably
- * better to define your own header.  Use of this header is currently
- * UNSUPPORTED.
- */
-
-
-#if defined __cplusplus
-#include <qglobal.h>
-#ifdef Q_WS_WIN
-# define _POSIX_
-# include <limits.h>
-# undef _POSIX_
-#endif
-#include <qcoreapplication.h>
-#include <qlist.h>
-#include <qvariant.h>  /* All moc genereated code has this include */
-#include <qobject.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <stdlib.h>
-#endif
diff --git a/src/core/global/qt_windows.h b/src/core/global/qt_windows.h
deleted file mode 100644 (file)
index da501bd..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the QtCore module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.  Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT_WINDOWS_H
-#define QT_WINDOWS_H
-
-#if defined(Q_CC_BOR)
-// Borland's windows.h does not set these correctly, resulting in
-// unusable WinSDK standard dialogs
-#ifndef WINVER
-#define WINVER 0x400
-#endif
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x400
-#endif
-#endif
-
-#if defined(Q_CC_MINGW)
-// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation
-#ifndef WINVER
-#define WINVER 0x500
-#endif
-#endif
-
-#include <windows.h>
-
-#ifdef _WIN32_WCE
-#include <ceconfig.h>
-#endif
-
-// already defined when compiled with WINVER >= 0x0500
-#ifndef SPI_SETMENUANIMATION
-#define SPI_SETMENUANIMATION 0x1003
-#endif
-#ifndef SPI_SETMENUFADE
-#define SPI_SETMENUFADE 0x1013
-#endif
-#ifndef SPI_SETCOMBOBOXANIMATION
-#define SPI_SETCOMBOBOXANIMATION 0x1005
-#endif
-#ifndef SPI_SETTOOLTIPANIMATION
-#define SPI_SETTOOLTIPANIMATION 0x1017
-#endif
-#ifndef SPI_SETTOOLTIPFADE
-#define SPI_SETTOOLTIPFADE 0x1019
-#endif
-#ifndef SPI_SETUIEFFECTS
-#define SPI_SETUIEFFECTS 0x103F
-#endif
-#ifndef SPI_GETMENUANIMATION
-#define SPI_GETMENUANIMATION 0x1002
-#endif
-#ifndef SPI_GETMENUFADE
-#define SPI_GETMENUFADE 0x1012
-#endif
-#ifndef SPI_GETCOMBOBOXANIMATION
-#define SPI_GETCOMBOBOXANIMATION 0x1004
-#endif
-#ifndef SPI_GETTOOLTIPANIMATION
-#define SPI_GETTOOLTIPANIMATION 0x1016
-#endif
-#ifndef SPI_GETTOOLTIPFADE
-#define SPI_GETTOOLTIPFADE 0x1018
-#endif
-#ifndef SPI_GETUIEFFECTS
-#define SPI_GETUIEFFECTS 0x103E
-#endif
-#ifndef SPI_GETKEYBOARDCUES
-#define SPI_GETKEYBOARDCUES 0x100A
-#endif
-#ifndef SPI_GETGRADIENTCAPTIONS
-#define SPI_GETGRADIENTCAPTIONS 0x1008
-#endif
-#ifndef IDC_HAND
-#define IDC_HAND MAKEINTRESOURCE(32649)
-#endif
-#ifndef WM_MOUSEWHEEL
-#define WM_MOUSEWHEEL 0x020A
-#endif
-#ifndef WM_MOUSEHWHEEL
-#define WM_MOUSEHWHEEL 0x020E
-#endif
-#ifndef ETO_PDY
-#define ETO_PDY 0x2000
-#endif
-#ifndef COLOR_GRADIENTACTIVECAPTION
-#define COLOR_GRADIENTACTIVECAPTION 27
-#endif
-#ifndef COLOR_GRADIENTINACTIVECAPTION
-#define COLOR_GRADIENTINACTIVECAPTION 28
-#endif
-
-// already defined when compiled with WINVER >= 0x0600
-#ifndef SPI_GETFLATMENU
-#define SPI_GETFLATMENU 0x1022
-#endif
-#ifndef CS_DROPSHADOW
-#define CS_DROPSHADOW 0x00020000
-#endif
-#ifndef CLEARTYPE_QUALITY
-#define CLEARTYPE_QUALITY 5
-#endif
-
-#ifdef Q_WS_WINCE
-#ifndef LR_DEFAULTSIZE
-#define LR_DEFAULTSIZE 0
-#endif
-#ifndef LR_SHARED
-#define LR_SHARED 0
-#endif
-#endif // Q_WS_WINCE
-
-#endif // QT_WINDOWS_H
index cb81d70..5ce42c9 100644 (file)
@@ -74,10 +74,6 @@ class Q_AUTOTEST_EXPORT QFSFileEnginePrivate : public QAbstractFileEnginePrivate
     Q_DECLARE_PUBLIC(QFSFileEngine)
 
 public:
-#ifdef Q_WS_WIN
-    static QString longFileName(const QString &path);
-#endif
-
     QFileSystemEntry fileEntry;
     QIODevice::OpenMode openMode;
 
@@ -115,19 +111,7 @@ public:
 
     FILE *fh;
 
-#ifdef Q_WS_WIN
-    HANDLE fileHandle;
-    HANDLE mapHandle;
-    QHash<uchar *, DWORD /* offset % AllocationGranularity */> maps;
-
-#ifndef Q_OS_WINCE
-    mutable int cachedFd;
-#endif
-
-    mutable DWORD fileAttrib;
-#else
     QHash<uchar *, QPair<int /*offset % PageSize*/, size_t /*length + offset % PageSize*/> > maps;
-#endif
     int fd;
 
     enum LastIOCommand
index 01116d8..c57bae4 100644 (file)
@@ -319,23 +319,9 @@ inline bool QAbstractItemModel::removeColumn(int acolumn, const QModelIndex &apa
 inline QModelIndex QAbstractItemModel::createIndex(int arow, int acolumn, void *adata) const
 { return QModelIndex(arow, acolumn, adata, this); }
 inline QModelIndex QAbstractItemModel::createIndex(int arow, int acolumn, int aid) const
-#if defined(Q_CC_MSVC)
-#pragma warning( push )
-#pragma warning( disable : 4312 ) // avoid conversion warning on 64-bit
-#endif
 { return QModelIndex(arow, acolumn, reinterpret_cast<void*>(aid), this); }
-#if defined(Q_CC_MSVC)
-#pragma warning( pop )
-#endif
 inline QModelIndex QAbstractItemModel::createIndex(int arow, int acolumn, quint32 aid) const
-#if defined(Q_CC_MSVC)
-#pragma warning( push )
-#pragma warning( disable : 4312 ) // avoid conversion warning on 64-bit
-#endif
 { return QModelIndex(arow, acolumn, reinterpret_cast<void*>(aid), this); }
-#if defined(Q_CC_MSVC)
-#pragma warning( pop )
-#endif
 
 
 class Q_CORE_EXPORT QAbstractTableModel : public QAbstractItemModel
index 6400e64..5825701 100644 (file)
 #include <QtCore/qstringlist.h>
 #endif
 
-#if defined(Q_WS_WIN) && !defined(tagMSG)
-typedef struct tagMSG MSG;
-#endif
-
 QT_BEGIN_HEADER
 
 QT_BEGIN_NAMESPACE
@@ -145,11 +141,6 @@ public:
 
     static void flush();
 
-
-#if defined(Q_WS_WIN)
-    virtual bool winEventFilter(MSG *message, long *result);
-#endif
-
 #if defined(Q_OS_UNIX)
     static void watchUnixSignal(int signal, bool watch);
 #endif
@@ -233,11 +224,6 @@ 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)
-Q_CORE_EXPORT QString decodeMSG(const MSG &);
-Q_CORE_EXPORT QDebug operator<<(QDebug, const MSG &);
-#endif
-
 QT_END_NAMESPACE
 
 QT_END_HEADER
index 1945927..165510b 100644 (file)
@@ -53,9 +53,6 @@
 // We mean it.
 //
 
-#ifdef Q_WS_WIN
-# include "QtCore/qt_windows.h"
-#endif
 #include "QtCore/qlibrary.h"
 #include "QtCore/qplugin.h"
 #include "QtCore/qsharedpointer.h"
@@ -70,13 +67,7 @@ class QSettings;
 class QLibraryPrivate
 {
 public:
-
-#ifdef Q_WS_WIN
-    HINSTANCE
-#else
-    void *
-#endif
-    pHnd;
+    void *pHnd;
 
     QString fileName, qualifiedFileName;
     QString fullVersion;
index 70b2d45..f80e413 100644 (file)
@@ -86,33 +86,20 @@ public:
         return *this;
     }
 
-    // Atomic API, implemented in qatomic_XXX.h
-
-    static bool isReferenceCountingNative();
-    static bool isReferenceCountingWaitFree();
-
+    // Atomic API, implemented in qatomic_generic.h
     bool ref();
     bool deref();
 
-    static bool isTestAndSetNative();
-    static bool isTestAndSetWaitFree();
-
     bool testAndSetRelaxed(int expectedValue, int newValue);
     bool testAndSetAcquire(int expectedValue, int newValue);
     bool testAndSetRelease(int expectedValue, int newValue);
     bool testAndSetOrdered(int expectedValue, int newValue);
 
-    static bool isFetchAndStoreNative();
-    static bool isFetchAndStoreWaitFree();
-
     int fetchAndStoreRelaxed(int newValue);
     int fetchAndStoreAcquire(int newValue);
     int fetchAndStoreRelease(int newValue);
     int fetchAndStoreOrdered(int newValue);
 
-    static bool isFetchAndAddNative();
-    static bool isFetchAndAddWaitFree();
-
     int fetchAndAddRelaxed(int valueToAdd);
     int fetchAndAddAcquire(int valueToAdd);
     int fetchAndAddRelease(int valueToAdd);
@@ -163,27 +150,17 @@ public:
         return *this;
     }
 
-    // Atomic API, implemented in qatomic_XXX.h
-
-    static bool isTestAndSetNative();
-    static bool isTestAndSetWaitFree();
-
+    // Atomic API, implemented in qatomic_generic.h
     bool testAndSetRelaxed(T *expectedValue, T *newValue);
     bool testAndSetAcquire(T *expectedValue, T *newValue);
     bool testAndSetRelease(T *expectedValue, T *newValue);
     bool testAndSetOrdered(T *expectedValue, T *newValue);
 
-    static bool isFetchAndStoreNative();
-    static bool isFetchAndStoreWaitFree();
-
     T *fetchAndStoreRelaxed(T *newValue);
     T *fetchAndStoreAcquire(T *newValue);
     T *fetchAndStoreRelease(T *newValue);
     T *fetchAndStoreOrdered(T *newValue);
 
-    static bool isFetchAndAddNative();
-    static bool isFetchAndAddWaitFree();
-
     T *fetchAndAddRelaxed(qptrdiff valueToAdd);
     T *fetchAndAddAcquire(qptrdiff valueToAdd);
     T *fetchAndAddRelease(qptrdiff valueToAdd);
index dcfaa8f..c0a937a 100644 (file)
@@ -116,20 +116,11 @@ public:
         }
     }
 
-#if defined(Q_CC_MSVC)
-#pragma warning( push )
-#pragma warning( disable : 4312 ) // ignoring the warning from /Wp64
-#endif
-
     inline QMutex *mutex() const
     {
         return reinterpret_cast<QMutex *>(val & ~quintptr(1u));
     }
 
-#if defined(Q_CC_MSVC)
-#pragma warning( pop )
-#endif
-
 private:
     Q_DISABLE_COPY(QMutexLocker)
 
index e7b525f..285f405 100644 (file)
@@ -78,11 +78,6 @@ private:
     friend class QWaitCondition;
 };
 
-#if defined(Q_CC_MSVC)
-#pragma warning( push )
-#pragma warning( disable : 4312 ) // ignoring the warning from /Wp64
-#endif
-
 class Q_CORE_EXPORT QReadLocker
 {
 public:
@@ -172,10 +167,6 @@ inline QWriteLocker::QWriteLocker(QReadWriteLock *areadWriteLock)
     relock();
 }
 
-#if defined(Q_CC_MSVC)
-#pragma warning( pop )
-#endif
-
 #else // QT_NO_THREAD
 
 class Q_CORE_EXPORT QReadWriteLock
index 4645f0d..d65678f 100644 (file)
@@ -86,18 +86,10 @@ Q_CORE_EXPORT uint qHash(const QString &key);
 Q_CORE_EXPORT uint qHash(const QStringRef &key);
 Q_CORE_EXPORT uint qHash(const QBitArray &key);
 
-#if defined(Q_CC_MSVC)
-#pragma warning( push )
-#pragma warning( disable : 4311 ) // disable pointer truncation warning
-#endif
 template <class T> inline uint qHash(const T *key)
 {
     return qHash(reinterpret_cast<quintptr>(key));
 }
-#if defined(Q_CC_MSVC)
-#pragma warning( pop )
-#endif
-
 template <typename T1, typename T2> inline uint qHash(const QPair<T1, T2> &key)
 {
     uint h1 = qHash(key.first);
index f0b7742..dfabbb9 100644 (file)
 #include "qstringlist.h"
 #include "qvariant.h"
 #include "qstringbuilder.h"
-#if defined(Q_WS_WIN)
-#   include "qt_windows.h"
-#   include <time.h>
-#endif
 #include "qnumeric.h"
 #include "qnumeric_p.h"
 
index 2d76030..8cfa2a3 100644 (file)
@@ -67,7 +67,7 @@ public:
     ~QPrintDialog();
 
     int exec();
-#if defined (Q_OS_UNIX) && !defined(Q_WS_MAC)
+#if defined (Q_OS_UNIX)
     virtual void accept();
 #endif
     void done(int result);
@@ -78,7 +78,7 @@ public:
     void setOptions(PrintDialogOptions options);
     PrintDialogOptions options() const;
 
-#if defined(Q_OS_UNIX) || defined(Q_WS_MAC) || defined(Q_OS_WIN)
+#if defined(Q_OS_UNIX)
     void setVisible(bool visible);
 #endif
 
index d599c99..944bc14 100644 (file)
@@ -146,26 +146,6 @@ public:
 
     bool convertFromImage(const QImage &img, Qt::ImageConversionFlags flags = Qt::AutoColor);
 
-#if defined(Q_WS_WIN)
-    enum HBitmapFormat {
-        NoAlpha,
-        PremultipliedAlpha,
-        Alpha
-    };
-
-    HBITMAP toWinHBITMAP(HBitmapFormat format = NoAlpha) const;
-    HICON toWinHICON() const;
-
-    static QPixmap fromWinHBITMAP(HBITMAP hbitmap, HBitmapFormat format = NoAlpha);
-    static QPixmap fromWinHICON(HICON hicon);
-#endif
-
-#if defined(Q_WS_MAC)
-    CGImageRef toMacCGImageRef() const;
-    static QPixmap fromMacCGImageRef(CGImageRef image);
-#endif
-
-
     inline QPixmap copy(int x, int y, int width, int height) const;
     QPixmap copy(const QRect &rect = QRect()) const;
 
@@ -179,11 +159,7 @@ public:
 
     bool isQBitmap() const;
 
-#if defined(Q_WS_MAC)
-    Qt::HANDLE macQDHandle() const;
-    Qt::HANDLE macQDAlphaHandle() const;
-    Qt::HANDLE macCGHandle() const;
-#elif defined(Q_WS_X11)
+#if defined(Q_WS_X11)
     enum ShareMode { ImplicitlyShared, ExplicitlyShared };
 
     static QPixmap fromX11Pixmap(Qt::HANDLE pixmap, ShareMode mode = ImplicitlyShared);
@@ -191,9 +167,6 @@ public:
     void x11SetScreen(int screen);
     const QX11Info &x11Info() const;
     Qt::HANDLE x11PictureHandle() const;
-#endif
-
-#if defined(Q_WS_X11)
     Qt::HANDLE handle() const;
 #endif
 
@@ -212,17 +185,7 @@ private:
 
     QPixmap(const QSize &s, int type);
     void init(int, int, int);
-#if defined(Q_WS_WIN)
-    void initAlphaPixmap(uchar *bytes, int length, struct tagBITMAPINFO *bmi);
-#endif
     Q_DUMMY_COMPARISON_OPERATOR(QPixmap)
-#ifdef Q_WS_MAC
-    friend CGContextRef qt_mac_cg_context(const QPaintDevice*);
-    friend CGImageRef qt_mac_create_imagemask(const QPixmap&, const QRectF&);
-    friend IconRef qt_mac_create_iconref(const QPixmap&);
-    friend quint32 *qt_mac_pixmap_get_base(const QPixmap*);
-    friend int qt_mac_pixmap_get_bytes_per_line(const QPixmap*);
-#endif
     friend class QPixmapData;
     friend class QX11PixmapData;
     friend class QBitmap;
index 0af3182..08d65c6 100644 (file)
 
 #include <QtGui/qpixmapdata_p.h>
 
-#ifdef Q_WS_WIN
-# include "qt_windows.h"
-#endif
-
 QT_BEGIN_NAMESPACE
 
 class Q_GUI_EXPORT QRasterPixmapData : public QPixmapData
index 6b108c7..32d7b5d 100644 (file)
@@ -206,9 +206,6 @@ private:
     friend class QMenuBar;
     friend class QShortcutMap;
     friend class QToolButton;
-#ifdef Q_WS_MAC
-    friend void qt_mac_clear_status_text(QAction *action);
-#endif
 };
 
 QT_BEGIN_INCLUDE_NAMESPACE
index c005269..7ad125c 100644 (file)
@@ -92,9 +92,6 @@ class Q_GUI_EXPORT QApplication : public QCoreApplication
 #ifndef QT_NO_STYLE_STYLESHEET
     Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
 #endif
-#ifdef Q_WS_WINCE
-    Q_PROPERTY(int autoMaximizeThreshold READ autoMaximizeThreshold WRITE setAutoMaximizeThreshold)
-#endif
     Q_PROPERTY(bool autoSipEnabled READ autoSipEnabled WRITE setAutoSipEnabled)
 
 public:
@@ -200,19 +197,12 @@ public:
     static bool isEffectEnabled(Qt::UIEffect);
     static void setEffectEnabled(Qt::UIEffect, bool enable = true);
 
-#if defined(Q_WS_MAC)
-    virtual bool macEventFilter(EventHandlerCallRef, EventRef);
-#endif
 #if defined(Q_WS_X11)
     virtual bool x11EventFilter(XEvent *);
     virtual int x11ClientMessage(QWidget*, XEvent*, bool passive_only);
     int x11ProcessEvent(XEvent*);
 #endif
 
-#if defined(Q_WS_WIN)
-    void winFocus(QWidget *, bool);
-    static void winMouseButtonUp();
-#endif
 #ifndef QT_NO_SESSIONMANAGER
     // session management
     bool isSessionRestored() const;
@@ -258,10 +248,6 @@ public Q_SLOTS:
 #ifndef QT_NO_STYLE_STYLESHEET
     void setStyleSheet(const QString& sheet);
 #endif
-#ifdef Q_WS_WINCE
-    void setAutoMaximizeThreshold(const int threshold);
-    int autoMaximizeThreshold() const;
-#endif
     void setAutoSipEnabled(const bool enabled);
     bool autoSipEnabled() const;
     static void closeAllWindows();
@@ -307,7 +293,7 @@ private:
     friend class QGestureManager;
 #endif
 
-#if defined(Q_WS_MAC) || defined(Q_WS_X11)
+#if defined(Q_WS_X11)
     Q_PRIVATE_SLOT(d_func(), void _q_alertTimeOut())
 #endif
 #if defined(QT_RX71_MULTITOUCH)
index d9f96ff..e32e000 100644 (file)
@@ -101,7 +101,6 @@ extern QSysInfo::MacVersion qt_macver;
 #ifndef QT_NO_TABLET
 struct QTabletDeviceData
 {
-#ifndef Q_WS_MAC
     int minPressure;
     int maxPressure;
     int minTanPressure;
@@ -109,13 +108,10 @@ struct QTabletDeviceData
     int minX, maxX, minY, maxY, minZ, maxZ;
     inline QPointF scaleCoord(int coordX, int coordY, int outOriginX, int outExtentX,
                               int outOriginY, int outExtentY) const;
-#endif
 
-#if defined(Q_WS_X11) || (defined(Q_WS_MAC) && !defined(QT_MAC_USE_COCOA))
+#if defined(Q_WS_X11)
     QPointer<QWidget> widgetToGetPress;
-#endif
 
-#ifdef Q_WS_X11
     int deviceType;
     enum {
         TOTAL_XINPUT_EVENTS = 64
@@ -131,15 +127,6 @@ struct QTabletDeviceData
     int xinput_button_release;
     int xinput_proximity_in;
     int xinput_proximity_out;
-#elif defined(Q_WS_WIN)
-    qint64 llId;
-    int currentDevice;
-    int currentPointerType;
-#elif defined(Q_WS_MAC)
-    quint64 tabletUniqueID;
-    int tabletDeviceType;
-    int tabletPointerType;
-    int capabilityMask;
 #endif
 };
 
@@ -148,7 +135,6 @@ static inline int sign(int x)
     return x >= 0 ? 1 : -1;
 }
 
-#ifndef Q_WS_MAC
 inline QPointF QTabletDeviceData::scaleCoord(int coordX, int coordY,
                                             int outOriginX, int outExtentX,
                                             int outOriginY, int outExtentY) const
@@ -169,90 +155,11 @@ inline QPointF QTabletDeviceData::scaleCoord(int coordX, int coordY,
 
     return ret;
 }
-#endif
 
 typedef QList<QTabletDeviceData> QTabletDeviceDataList;
 QTabletDeviceDataList *qt_tablet_devices();
-# if defined(Q_WS_MAC)
-typedef QHash<int, QTabletDeviceData> QMacTabletHash;
-QMacTabletHash *qt_mac_tablet_hash();
-# endif
-#endif
-
-
-#if defined(Q_WS_WIN)
-typedef BOOL (WINAPI *PtrRegisterTouchWindow)(HWND, ULONG);
-typedef BOOL (WINAPI *PtrGetTouchInputInfo)(HANDLE, UINT, PVOID, int);
-typedef BOOL (WINAPI *PtrCloseTouchInputHandle)(HANDLE);
-
-#ifndef QT_NO_GESTURES
-typedef BOOL (WINAPI *PtrGetGestureInfo)(HANDLE, PVOID);
-typedef BOOL (WINAPI *PtrGetGestureExtraArgs)(HANDLE, UINT, PBYTE);
-typedef BOOL (WINAPI *PtrCloseGestureInfoHandle)(HANDLE);
-typedef BOOL (WINAPI *PtrSetGestureConfig)(HWND, DWORD, UINT, PVOID, UINT);
-typedef BOOL (WINAPI *PtrGetGestureConfig)(HWND, DWORD, DWORD, PUINT, PVOID, UINT);
-
-typedef BOOL (WINAPI *PtrBeginPanningFeedback)(HWND);
-typedef BOOL (WINAPI *PtrUpdatePanningFeedback)(HWND, LONG, LONG, BOOL);
-typedef BOOL (WINAPI *PtrEndPanningFeedback)(HWND, BOOL);
-
-#ifndef WM_GESTURE
-#  define WM_GESTURE 0x0119
-
-#  define GID_BEGIN                       1
-#  define GID_END                         2
-#  define GID_ZOOM                        3
-#  define GID_PAN                         4
-#  define GID_ROTATE                      5
-#  define GID_TWOFINGERTAP                6
-#  define GID_ROLLOVER                    7
-
-typedef struct tagGESTUREINFO
-{
-    UINT cbSize;
-    DWORD dwFlags;
-    DWORD dwID;
-    HWND hwndTarget;
-    POINTS ptsLocation;
-    DWORD dwInstanceID;
-    DWORD dwSequenceID;
-    ULONGLONG ullArguments;
-    UINT cbExtraArgs;
-} GESTUREINFO;
-
-#  define GC_PAN                                      0x00000001
-#  define GC_PAN_WITH_SINGLE_FINGER_VERTICALLY        0x00000002
-#  define GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY      0x00000004
-
-#  define GC_ZOOM                                     0x00000001
-#  define GC_ROTATE                                   0x00000001
-
-typedef struct tagGESTURECONFIG
-{
-    DWORD dwID;
-    DWORD dwWant;
-    DWORD dwBlock;
-} GESTURECONFIG;
-
-#  define GID_ROTATE_ANGLE_FROM_ARGUMENT(arg) ((((double)(arg) / 65535.0) * 4.0 * 3.14159265) - 2.0*3.14159265)
-
-#endif // WM_GESTURE
-
-#if defined(Q_WS_WINCE_WM) && defined(QT_WINCE_GESTURES)
-#undef GID_ZOOM
-#define GID_ZOOM 0xf000
-#undef GID_ROTATE
-#define GID_ROTATE 0xf001
-#undef GID_TWOFINGERTAP
-#define GID_TWOFINGERTAP 0xf002
-#undef GID_ROLLOVER
-#define GID_ROLLOVER 0xf003
 #endif
 
-#endif // QT_NO_GESTURES
-
-#endif // Q_WS_WIN
-
 typedef QHash<QByteArray, QFont> FontHash;
 FontHash *qt_app_fonts_hash();
 
@@ -274,9 +181,6 @@ public:
 #endif
     static bool quitOnLastWindowClosed;
     static void emitLastWindowClosed();
-#ifdef Q_WS_WINCE
-    static int autoMaximizeThreshold;
-#endif
     static bool autoSipEnabled;
     static QString desktopStyleKey();
 
@@ -292,10 +196,6 @@ public:
     static bool isBlockedByModal(QWidget *widget);
     static bool modalState();
     static bool tryModalHelper(QWidget *widget, QWidget **rettop = 0);
-#ifdef Q_WS_MAC
-    static QWidget *tryModalHelper_sys(QWidget *top);
-       bool canQuit();
-#endif
 
     bool notify_helper(QObject *receiver, QEvent * e);
 
@@ -394,10 +294,6 @@ public:
     static bool widgetCount; // Coupled with -widgetcount switch
     static bool load_testability; // Coupled with -testability switch
 
-#ifdef Q_WS_MAC
-    static bool native_modal_dialog_active;
-#endif
-
     static void setSystemPalette(const QPalette &pal);
     static void setPalette_helper(const QPalette &palette, const char* className, bool clearWidgetPaletteHash);
     static void initializeWidgetPaletteHash();
@@ -407,17 +303,6 @@ public:
     static void applyX11SpecificCommandLineArguments(QWidget *main_widget);
 #endif
 
-#ifdef Q_WS_MAC
-    static OSStatus globalEventProcessor(EventHandlerCallRef, EventRef, void *);
-    static OSStatus globalAppleEventProcessor(const AppleEvent *, AppleEvent *, long);
-    static OSStatus tabletProximityCallback(EventHandlerCallRef, EventRef, void *);
-#ifdef QT_MAC_USE_COCOA
-    static void qt_initAfterNSAppStarted();
-    static void setupAppleEvents();
-#endif
-    static bool qt_mac_apply_settings();
-#endif
-
     static QApplicationPrivate *instance() { return self; }
 
     static QString styleOverride;
@@ -427,7 +312,7 @@ public:
     static Qt::NavigationMode navigationMode;
 #endif
 
-#if defined(Q_WS_MAC) || defined(Q_WS_X11)
+#if defined(Q_WS_X11)
     void _q_alertTimeOut();
     QHash<QWidget *, QTimer *> alertTimerHash;
 #endif
@@ -441,7 +326,7 @@ public:
     static bool sendMouseEvent(QWidget *receiver, QMouseEvent *event, QWidget *alienWidget,
                                QWidget *native, QWidget **buttonDown, QPointer<QWidget> &lastMouseReceiver,
                                bool spontaneous = true);
-#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC)
+#if defined(Q_WS_X11)
     void sendSyntheticEnterLeave(QWidget *widget);
 #endif
 
@@ -449,14 +334,11 @@ public:
     QGestureManager *gestureManager;
     QWidget *gestureWidget;
 #endif
-#if defined(Q_WS_X11) || defined(Q_WS_WIN)
+#if defined(Q_WS_X11)
     QPixmap *move_cursor;
     QPixmap *copy_cursor;
     QPixmap *link_cursor;
 #endif
-#if defined(Q_WS_WIN)
-    QPixmap *ignore_cursor;
-#endif
     QPixmap getPixmapCursor(Qt::CursorShape cshape);
 
     QMap<int, QWeakPointer<QWidget> > widgetForTouchPointId;
@@ -473,27 +355,6 @@ public:
                                        QTouchEvent::DeviceType deviceType,
                                        const QList<QTouchEvent::TouchPoint> &touchPoints);
 
-#if defined(Q_WS_WIN)
-    static bool HasTouchSupport;
-    static PtrRegisterTouchWindow RegisterTouchWindow;
-    static PtrGetTouchInputInfo GetTouchInputInfo;
-    static PtrCloseTouchInputHandle CloseTouchInputHandle;
-
-    QHash<DWORD, int> touchInputIDToTouchPointID;
-    bool translateTouchEvent(const MSG &msg);
-
-#ifndef QT_NO_GESTURES
-    PtrGetGestureInfo GetGestureInfo;
-    PtrGetGestureExtraArgs GetGestureExtraArgs;
-    PtrCloseGestureInfoHandle CloseGestureInfoHandle;
-    PtrSetGestureConfig SetGestureConfig;
-    PtrGetGestureConfig GetGestureConfig;
-    PtrBeginPanningFeedback BeginPanningFeedback;
-    PtrUpdatePanningFeedback UpdatePanningFeedback;
-    PtrEndPanningFeedback EndPanningFeedback;
-#endif // QT_NO_GESTURES
-#endif
-
 #ifdef QT_RX71_MULTITOUCH
     bool hasRX71MultiTouch;
 
@@ -529,9 +390,7 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
                                             QTouchEvent::DeviceType deviceType,
                                             const QList<QTouchEvent::TouchPoint> &touchPoints);
 
-#if defined(Q_WS_WIN)
-  extern void qt_win_set_cursor(QWidget *, bool);
-#elif defined(Q_WS_X11)
+#if defined(Q_WS_X11)
   extern void qt_x11_enforce_cursor(QWidget *, bool);
   extern void qt_x11_enforce_cursor(QWidget *);
 #endif
index cb548c7..fcfc1c5 100644 (file)
@@ -65,7 +65,7 @@ class Q_GUI_EXPORT  QSessionManager : public QObject
 public:
     QString sessionId() const;
     QString sessionKey() const;
-#if defined(Q_WS_X11) || defined(Q_WS_MAC)
+#if defined(Q_WS_X11)
     void *handle() const;
 #endif
 
index 4627d09..c45a442 100644 (file)
@@ -179,17 +179,10 @@ public:
     void setSystemRect(const QRect &rect);
     QRect systemRect() const;
 
-#ifdef Q_WS_WIN
-    virtual HDC getDC() const;
-    virtual void releaseDC(HDC hdc) const;
-#endif
-
     virtual QPoint coordinateOffset() const;
 
     enum Type {
         X11,
-        Windows,
-        QuickDraw, CoreGraphics, MacPrinter,
         QWindowSystem,
         PostScript,
         OpenGL,
index aa0ed08..2851538 100644 (file)
@@ -214,17 +214,6 @@ public:
     void saveBuffer(const QString &s) const;
 #endif
 
-#ifdef Q_WS_MAC
-    void setCGContext(CGContextRef ref);
-    CGContextRef getCGContext() const;
-#endif
-
-#ifdef Q_WS_WIN
-    void setDC(HDC hdc);
-    HDC getDC() const;
-    void releaseDC(HDC hdc) const;
-#endif
-
     void alphaPenBlt(const void* src, int bpl, int depth, int rx,int ry,int w,int h);
 
     Type type() const { return Raster; }
@@ -316,12 +305,6 @@ public:
     QScopedPointer<QOutlineMapper> outlineMapper;
     QScopedPointer<QRasterBuffer>  rasterBuffer;
 
-#if defined (Q_WS_WIN)
-    HDC hdc;
-#elif defined(Q_WS_MAC)
-    CGContextRef cgContext;
-#endif
-
     QRect deviceRect;
     QRect deviceRectUnclipped;
 
@@ -344,10 +327,6 @@ public:
     uint mono_surface : 1;
     uint outlinemapper_xform_dirty : 1;
 
-#ifdef Q_WS_WIN
-    uint isPlain45DegreeRotation : 1;
-#endif
-
     QScopedPointer<QRasterizer> rasterizer;
 };
 
index b790fab..bf3713f 100644 (file)
@@ -5127,8 +5127,7 @@ void QPainter::drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun)
         supportsTransformations = d->extended->supportsTransformations(fontD->fontEngine->fontDef.pixelSize,
                                                                        d->state->matrix);
     } else {
-        supportsTransformations = d->engine->type() == QPaintEngine::CoreGraphics
-                                  || d->state->matrix.isAffine();
+        supportsTransformations = d->state->matrix.isAffine();
     }
 
     for (int i=0; i<count; ++i) {
@@ -5768,16 +5767,10 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const
 
     QLineF line(pos.x(), pos.y(), pos.x() + qFloor(width), pos.y());
 
-    qreal underlineOffset = fe->underlinePosition().toReal();
-    qreal y = pos.y();
-    // compensate for different rounding rule in Core Graphics paint engine,
-    // ideally code like this should be moved to respective engines.
-    if (painter->paintEngine()->type() == QPaintEngine::CoreGraphics) {
-        y = qCeil(y);
-    }
+    const qreal underlineOffset = fe->underlinePosition().toReal();
     // deliberately ceil the offset to avoid the underline coming too close to
     // the text above it.
-    const qreal underlinePos = y + qCeil(underlineOffset);
+    const qreal underlinePos = pos.y() + qCeil(underlineOffset);
 
     if (underlineStyle == QTextCharFormat::SpellCheckUnderline) {
         underlineStyle = QTextCharFormat::UnderlineStyle(QApplication::style()->styleHint(QStyle::SH_SpellCheckUnderlineStyle));
index d0678b1..a3a098b 100644 (file)
@@ -593,9 +593,7 @@ QPrinter::QPrinter(PrinterMode mode)
     QPrinterInfo defPrn(QPrinterInfo::defaultPrinter());
     if (!defPrn.isNull()) {
         setPrinterName(defPrn.printerName());
-    } else if (QPrinterInfo::availablePrinters().isEmpty()
-               && d_ptr->paintEngine->type() != QPaintEngine::Windows
-               && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) {
+    } else if (QPrinterInfo::availablePrinters().isEmpty()) {
         setOutputFormat(QPrinter::PdfFormat);
     }
 }
index 4b54be0..2bffdec 100644 (file)
@@ -49,7 +49,7 @@
 
 #include <qdebug.h>
 
-#if defined(Q_OS_UNIX) || defined(Q_WS_WIN)
+#if defined(Q_OS_UNIX)
 #include "qimage.h"
 #include "qbitmap.h"
 #include <stdlib.h>
@@ -526,7 +526,7 @@ QRegion& QRegion::operator|=(const QRegion &r)
 
     \sa intersected()
 */
-#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN)
+#if !defined (Q_OS_UNIX)
 QRegion& QRegion::operator+=(const QRect &r)
 {
     return operator+=(QRegion(r));
@@ -549,7 +549,7 @@ QRegion& QRegion::operator&=(const QRegion &r)
    \overload
    \since 4.4
  */
-#if defined (Q_OS_UNIX) || defined (Q_WS_WIN)
+#if defined (Q_OS_UNIX)
 QRegion& QRegion::operator&=(const QRect &r)
 {
     return *this = *this & r;
@@ -693,7 +693,7 @@ bool QRegion::intersects(const QRegion &region) const
 */
 
 
-#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN)
+#if !defined (Q_OS_UNIX)
 /*!
     \overload
     \since 4.4
@@ -1048,7 +1048,7 @@ Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
     return result;
 }
 
-#if defined(Q_OS_UNIX) || defined(Q_WS_WIN)
+#if defined(Q_OS_UNIX)
 
 //#define QT_REGION_DEBUG
 /*
@@ -1585,14 +1585,6 @@ void QRegionPrivate::selfTest() const
 QT_BEGIN_INCLUDE_NAMESPACE
 # include "qregion_x11.cpp"
 QT_END_INCLUDE_NAMESPACE
-#elif defined(Q_WS_MAC)
-QT_BEGIN_INCLUDE_NAMESPACE
-# include "qregion_mac.cpp"
-QT_END_INCLUDE_NAMESPACE
-#elif defined(Q_WS_WIN)
-QT_BEGIN_INCLUDE_NAMESPACE
-# include "qregion_win.cpp"
-QT_END_INCLUDE_NAMESPACE
 #endif
 
 typedef void (*OverlapFunc)(QRegionPrivate &dest, const QRect *r1, const QRect *r1End,
@@ -3805,8 +3797,6 @@ QRegion::QRegion(const QRect &r, RegionType t)
 #if defined(Q_WS_X11)
         d->rgn = 0;
         d->xrectangles = 0;
-#elif defined(Q_WS_WIN)
-        d->rgn = 0;
 #endif
         if (t == Rectangle) {
             d->qt_rgn = new QRegionPrivate(r);
@@ -3830,8 +3820,6 @@ QRegion::QRegion(const QPolygon &a, Qt::FillRule fillRule)
 #if defined(Q_WS_X11)
             d->rgn = 0;
             d->xrectangles = 0;
-#elif defined(Q_WS_WIN)
-            d->rgn = 0;
 #endif
             d->qt_rgn = qt_rgn;
         } else {
@@ -3862,8 +3850,6 @@ QRegion::QRegion(const QBitmap &bm)
 #if defined(Q_WS_X11)
         d->rgn = 0;
         d->xrectangles = 0;
-#elif defined(Q_WS_WIN)
-        d->rgn = 0;
 #endif
         d->qt_rgn = qt_bitmapToRegion(bm);
     }
@@ -3877,9 +3863,6 @@ void QRegion::cleanUp(QRegion::QRegionData *x)
         XDestroyRegion(x->rgn);
     if (x->xrectangles)
         free(x->xrectangles);
-#elif defined(Q_WS_WIN)
-    if (x->rgn)
-        qt_win_dispose_rgn(x->rgn);
 #endif
     delete x;
 }
@@ -3912,8 +3895,6 @@ QRegion QRegion::copy() const
 #if defined(Q_WS_X11)
     x->rgn = 0;
     x->xrectangles = 0;
-#elif defined(Q_WS_WIN)
-    x->rgn = 0;
 #endif
     if (d->qt_rgn)
         x->qt_rgn = new QRegionPrivate(*d->qt_rgn);
index 6ae39b3..5fc90a2 100644 (file)
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
 template <class T> class QVector;
 class QVariant;
 
-#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN)
+#if defined(Q_WS_X11)
 struct QRegionPrivate;
 #endif
 
@@ -134,25 +134,8 @@ public:
     inline bool operator!=(const QRegion &r) const { return !(operator==(r)); }
     operator QVariant() const;
 
-#if defined(Q_WS_WIN)
-    inline HRGN    handle() const { ensureHandle(); return d->rgn; }
-#elif defined(Q_WS_X11)
+#if defined(Q_WS_X11)
     inline Region handle() const { if(!d->rgn) updateX11Region(); return d->rgn; }
-#elif defined(Q_WS_MAC)
-#if defined Q_WS_MAC32
-    RgnHandle toQDRgn() const;
-    RgnHandle toQDRgnForUpdate_sys() const;
-    static QRegion fromQDRgn(RgnHandle shape);
-#endif
-#ifdef QT_MAC_USE_COCOA
-    inline HIMutableShapeRef handle(bool unused = false) const
-    { Q_UNUSED(unused); return toHIMutableShape(); }
-#else
-    inline RgnHandle handle() const { return handle(false); }
-    inline RgnHandle handle(bool) const { return toQDRgn(); }
-#endif
-    HIMutableShapeRef toHIMutableShape() const;
-    static QRegion fromHIShapeRef(HIShapeRef shape);
 #endif
 
 #ifndef QT_NO_DATASTREAM
@@ -162,16 +145,10 @@ public:
 private:
     QRegion copy() const;   // helper of detach.
     void detach();
-#if defined(Q_WS_WIN)
-    void ensureHandle() const;
-    QRegion winCombine(const QRegion &r, int num) const;
-#elif defined(Q_WS_X11)
+#if defined(Q_WS_X11)
     void updateX11Region() const;
     void *clipRectangles(int &num) const;
     friend void *qt_getClipRects(const QRegion &r, int &num);
-#elif defined(Q_WS_MAC)
-    static OSStatus shape2QRegionHelper(int inMessage, HIShapeRef inShape,
-                                        const CGRect *inRect, void *inRefcon);
 #endif
     friend bool qt_region_strictContains(const QRegion &region,
                                          const QRect &rect);
@@ -182,19 +159,14 @@ private:
 #endif
     struct QRegionData {
         QBasicAtomicInt ref;
-#if defined(Q_WS_WIN)
-        HRGN   rgn;
-#elif defined(Q_WS_X11)
+#if defined(Q_WS_X11)
         Region rgn;
         void *xrectangles;
 #endif
-#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_WIN)
+#if defined(Q_WS_X11)
         QRegionPrivate *qt_rgn;
 #endif
     };
-#if defined(Q_WS_WIN)
-    friend class QETWidget;
-#endif
     struct QRegionData *d;
     static struct QRegionData shared_empty;
     static void cleanUp(QRegionData *x);
index 07281aa..f14774d 100644 (file)
@@ -71,18 +71,12 @@ public:
         : fontEngine(0)
         , hintingPreference(QFont::PreferDefaultHinting)
         , thread(0)
-#if defined(Q_WS_WIN)
-        , fontHandle(NULL)
-#endif
     {}
 
     QRawFontPrivate(const QRawFontPrivate &other)
         : fontEngine(other.fontEngine)
         , hintingPreference(other.hintingPreference)
         , thread(other.thread)
-#if defined(Q_WS_WIN)
-        , fontHandle(NULL)
-#endif
     {
         if (fontEngine != 0)
             fontEngine->ref.ref();
@@ -112,10 +106,6 @@ public:
     QFont::HintingPreference hintingPreference;
     QThread *thread;
     QAtomicInt ref;
-
-#if defined(Q_WS_WIN)
-    HANDLE fontHandle;
-#endif
 };
 
 QT_END_NAMESPACE
index c289184..a566f04 100644 (file)
@@ -90,9 +90,6 @@ public Q_SLOTS:
 
 protected:
     bool event(QEvent *e);
-#ifdef Q_WS_MAC
-    bool hitButton(const QPoint &pos) const;
-#endif // Q_WS_MAC
     void paintEvent(QPaintEvent *);
     void keyPressEvent(QKeyEvent *);
     void focusInEvent(QFocusEvent *);
index 2c7eed0..25f7245 100644 (file)
@@ -69,9 +69,6 @@ public:
 
     inline void init() { resetLayoutItemMargins(); }
     static QPushButtonPrivate* get(QPushButton *b) { return b->d_func(); }
-#ifdef Q_WS_MAC
-    bool hitButton(const QPoint &pos);
-#endif
 #ifndef QT_NO_MENU
     QPoint adjustedMenuPosition();
 #endif
index afc4e43..b04b3d1 100644 (file)
 
 #include "qstyle.h"
 #include "qstyleoption.h"
-#ifdef Q_WS_MAC
-#  include <qt_mac_p.h>
-#  include <qt_cocoa_helpers_mac_p.h>
-#endif
-
-#include <qdebug.h>
-
-#include <qwidget_p.h>
+#include "qdebug.h"
+#include "qwidget_p.h"
 
 QT_BEGIN_NAMESPACE
 
@@ -86,11 +80,7 @@ void QRubberBand::initStyleOption(QStyleOptionRubberBand *option) const
         return;
     option->initFrom(this);
     option->shape = d_func()->shape;
-#ifndef Q_WS_MAC
     option->opaque = true;
-#else
-    option->opaque = windowFlags() & RUBBERBAND_WINDOW_TYPE;
-#endif
 }
 
 /*!
@@ -142,18 +132,9 @@ QRubberBand::QRubberBand(Shape s, QWidget *p)
     Q_D(QRubberBand);
     d->shape = s;
     setAttribute(Qt::WA_TransparentForMouseEvents);
-#ifndef Q_WS_WIN
     setAttribute(Qt::WA_NoSystemBackground);
-#endif //Q_WS_WIN
     setAttribute(Qt::WA_WState_ExplicitShowHide);
     setVisible(false);
-#ifdef Q_WS_MAC
-    if (isWindow()) {
-        createWinId();
-        extern OSWindowRef qt_mac_window_for(const QWidget *); //qwidget_mac.cpp
-        macWindowSetHasShadow(qt_mac_window_for(this), false);
-    }
-#endif
 }
 
 /*!
index 2ae2259..a1b9078 100644 (file)
@@ -94,9 +94,7 @@ MainWindowBase::MainWindowBase(QWidget *parent, Qt::WindowFlags flags) :
     QMainWindow(parent, flags),
     m_policy(AcceptCloseEvents)
 {
-#ifndef Q_WS_MAC
     setWindowIcon(qDesigner->windowIcon());
-#endif
 }
 
 void MainWindowBase::closeEvent(QCloseEvent *e)
index 81ded48..043463e 100644 (file)
@@ -93,9 +93,7 @@ QDesigner::QDesigner(int &argc, char **argv)
     setApplicationName(QLatin1String(designerApplicationName));
     QDesignerComponents::initializeResources();
 
-#ifndef Q_WS_MAC
     setWindowIcon(QIcon(QLatin1String(":/trolltech/designer/images/designer.png")));
-#endif
     initialize();
 }
 
index 23a9f1d..bd34a35 100644 (file)
@@ -293,15 +293,7 @@ bool Driver::uic(const QString &fileName, QTextStream *out)
     if (out) {
         m_output = out;
     } else {
-#ifdef Q_WS_WIN
-        // As one might also redirect the output to a file on win, 
-        // we should not create the textstream with QFile::Text flag.
-        // The redirected file is opened in TextMode and this will
-        // result in broken line endings as writing will replace \n again.
-        m_output = new QTextStream(stdout, QIODevice::WriteOnly);
-#else
         m_output = new QTextStream(stdout, QIODevice::WriteOnly | QFile::Text);
-#endif
         deleteOutput = true;
     }
 
index a52a60d..eabac81 100644 (file)
 #include <QtCore/QTextStream>
 #include <QtCore/QDateTime>
 
-#if defined Q_WS_WIN
-#include <qt_windows.h>
-#endif
-
 QT_BEGIN_NAMESPACE
 
 Uic::Uic(Driver *d)