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 {
# 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>
|| (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
#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
# 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
#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
# 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
#else
# define QT_FASTCALL
#endif
-# elif defined(Q_CC_MSVC)
-# define QT_FASTCALL __fastcall
# else
# define QT_FASTCALL
# endif
#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)"
#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
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
};
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;
+++ /dev/null
-/****************************************************************************
-**
-** 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
+++ /dev/null
-/****************************************************************************
-**
-** 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
Q_DECLARE_PUBLIC(QFSFileEngine)
public:
-#ifdef Q_WS_WIN
- static QString longFileName(const QString &path);
-#endif
-
QFileSystemEntry fileEntry;
QIODevice::OpenMode openMode;
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
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
#include <QtCore/qstringlist.h>
#endif
-#if defined(Q_WS_WIN) && !defined(tagMSG)
-typedef struct tagMSG MSG;
-#endif
-
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
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
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
// 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"
class QLibraryPrivate
{
public:
-
-#ifdef Q_WS_WIN
- HINSTANCE
-#else
- void *
-#endif
- pHnd;
+ void *pHnd;
QString fileName, qualifiedFileName;
QString fullVersion;
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);
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);
}
}
-#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)
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:
relock();
}
-#if defined(Q_CC_MSVC)
-#pragma warning( pop )
-#endif
-
#else // QT_NO_THREAD
class Q_CORE_EXPORT QReadWriteLock
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);
#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"
~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);
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
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;
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);
void x11SetScreen(int screen);
const QX11Info &x11Info() const;
Qt::HANDLE x11PictureHandle() const;
-#endif
-
-#if defined(Q_WS_X11)
Qt::HANDLE handle() const;
#endif
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;
#include <QtGui/qpixmapdata_p.h>
-#ifdef Q_WS_WIN
-# include "qt_windows.h"
-#endif
-
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QRasterPixmapData : public QPixmapData
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
#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:
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;
#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();
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)
#ifndef QT_NO_TABLET
struct QTabletDeviceData
{
-#ifndef Q_WS_MAC
int minPressure;
int maxPressure;
int minTanPressure;
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
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
};
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
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();
#endif
static bool quitOnLastWindowClosed;
static void emitLastWindowClosed();
-#ifdef Q_WS_WINCE
- static int autoMaximizeThreshold;
-#endif
static bool autoSipEnabled;
static QString desktopStyleKey();
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);
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();
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;
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
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
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;
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;
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
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
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,
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; }
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;
uint mono_surface : 1;
uint outlinemapper_xform_dirty : 1;
-#ifdef Q_WS_WIN
- uint isPlain45DegreeRotation : 1;
-#endif
-
QScopedPointer<QRasterizer> rasterizer;
};
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) {
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));
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);
}
}
#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>
\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));
\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;
*/
-#if !defined (Q_OS_UNIX) && !defined (Q_WS_WIN)
+#if !defined (Q_OS_UNIX)
/*!
\overload
\since 4.4
return result;
}
-#if defined(Q_OS_UNIX) || defined(Q_WS_WIN)
+#if defined(Q_OS_UNIX)
//#define QT_REGION_DEBUG
/*
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,
#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);
#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 {
#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);
}
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;
}
#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);
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
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
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 ®ion,
const QRect &rect);
#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);
: 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();
QFont::HintingPreference hintingPreference;
QThread *thread;
QAtomicInt ref;
-
-#if defined(Q_WS_WIN)
- HANDLE fontHandle;
-#endif
};
QT_END_NAMESPACE
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 *);
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
#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
return;
option->initFrom(this);
option->shape = d_func()->shape;
-#ifndef Q_WS_MAC
option->opaque = true;
-#else
- option->opaque = windowFlags() & RUBBERBAND_WINDOW_TYPE;
-#endif
}
/*!
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
}
/*!
QMainWindow(parent, flags),
m_policy(AcceptCloseEvents)
{
-#ifndef Q_WS_MAC
setWindowIcon(qDesigner->windowIcon());
-#endif
}
void MainWindowBase::closeEvent(QCloseEvent *e)
setApplicationName(QLatin1String(designerApplicationName));
QDesignerComponents::initializeResources();
-#ifndef Q_WS_MAC
setWindowIcon(QIcon(QLatin1String(":/trolltech/designer/images/designer.png")));
-#endif
initialize();
}
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;
}
#include <QtCore/QTextStream>
#include <QtCore/QDateTime>
-#if defined Q_WS_WIN
-#include <qt_windows.h>
-#endif
-
QT_BEGIN_NAMESPACE
Uic::Uic(Driver *d)