diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 08:54:45 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-09-13 08:54:45 +0200 |
commit | b62bd0584a7872b6917917009b707785b3abd077 (patch) | |
tree | 9981f274712c098cabbff0c4667672a3934e5393 /src/corelib/global | |
parent | 5e10745dca1d10025404a9f268f03ae697fb10cc (diff) | |
parent | 97baad65f65783d2b5ff938f6217aec9434f2e5f (diff) |
Merge branch 'refactor'
Conflicts:
mkspecs/qws/linux-lsb-g++/qmake.conf
src/gui/image/qpixmap_mac.cpp
src/gui/painting/qpaintengine_x11.cpp
src/gui/painting/qtessellator.cpp
src/gui/text/qfontengine_qws.cpp
src/gui/text/qfontengine_x11.cpp
src/gui/widgets/qlinecontrol.cpp
src/opengl/qgl.h
src/opengl/qgl_x11egl.cpp
src/plugins/plugins.pro
Change-Id: If52dcd55cd55f2983a756c2f843967702b60a310
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qglobal.h | 65 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.h | 58 | ||||
-rw-r--r-- | src/corelib/global/qt_pch.h | 2 |
3 files changed, 80 insertions, 45 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1552f67695..1cfd70112f 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -289,7 +289,7 @@ namespace QT_NAMESPACE {} #endif #if defined(Q_OS_DARWIN) -# define Q_OS_MAC /* Q_OS_MAC is mostly for compatibility, but also more clear */ +# define Q_OS_MAC # define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/ # if defined(Q_OS_DARWIN64) # define Q_OS_MAC64 @@ -298,12 +298,6 @@ namespace QT_NAMESPACE {} # endif #endif -#ifdef QT_AUTODETECT_COCOA -# ifdef Q_OS_MAC64 -# define QT_MAC_USE_COCOA 1 -# endif -#endif - #if defined(Q_WS_MAC64) && !defined(QT_MAC_USE_COCOA) && !defined(QT_BUILD_QMAKE) && !defined(QT_BOOTSTRAPPED) #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration." #endif @@ -877,7 +871,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_) @@ -897,15 +893,7 @@ namespace QT_NAMESPACE {} # define Q_WS_PM # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" #elif defined(Q_OS_UNIX) -# if defined(Q_OS_MAC) && !defined(__USE_WS_X11__) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA) -# define Q_WS_MAC -# define Q_WS_MACX -# if defined(Q_OS_MAC64) -# define Q_WS_MAC64 -# elif defined(Q_OS_MAC32) -# define Q_WS_MAC32 -# endif -# elif defined(Q_OS_SYMBIAN) +# if defined(Q_OS_SYMBIAN) # if !defined(QT_NO_S60) # define Q_WS_S60 # endif @@ -1143,7 +1131,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 @@ -1268,6 +1256,16 @@ class QDataStream; # else # define Q_GUI_EXPORT Q_DECL_IMPORT # endif +# if defined(QT_BUILD_WIDGETS_LIB) +# define Q_WIDGETS_EXPORT Q_DECL_EXPORT +# else +# define Q_WIDGETS_EXPORT Q_DECL_IMPORT +# endif +# if defined(QT_BUILD_PRINTSUPPORT_LIB) +# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT +# else +# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT +# endif # if defined(QT_BUILD_SQL_LIB) # define Q_SQL_EXPORT Q_DECL_EXPORT # else @@ -1283,6 +1281,11 @@ class QDataStream; # else # define Q_SVG_EXPORT Q_DECL_IMPORT # endif +# if defined(QT_BUILD_QTQUICK1_LIB) +# define Q_QTQUICK1_EXPORT Q_DECL_EXPORT +# else +# define Q_QTQUICK1_EXPORT Q_DECL_IMPORT +# endif # if defined(QT_BUILD_DECLARATIVE_LIB) # define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT # else @@ -1352,10 +1355,13 @@ class QDataStream; # elif defined(QT_DLL) /* use a Qt DLL library */ # define Q_CORE_EXPORT Q_DECL_IMPORT # define Q_GUI_EXPORT Q_DECL_IMPORT +# define Q_WIDGETS_EXPORT Q_DECL_IMPORT +# define Q_PRINTSUPPORT_EXPORT Q_DECL_IMPORT # define Q_SQL_EXPORT Q_DECL_IMPORT # define Q_NETWORK_EXPORT Q_DECL_IMPORT # define Q_SVG_EXPORT Q_DECL_IMPORT # define Q_DECLARATIVE_EXPORT Q_DECL_IMPORT +# define Q_QTQUICK1_EXPORT Q_DECL_IMPORT # define Q_CANVAS_EXPORT Q_DECL_IMPORT # define Q_OPENGL_EXPORT Q_DECL_IMPORT # define Q_MULTIMEDIA_EXPORT Q_DECL_IMPORT @@ -1384,10 +1390,13 @@ class QDataStream; # if defined(QT_SHARED) # define Q_CORE_EXPORT Q_DECL_EXPORT # define Q_GUI_EXPORT Q_DECL_EXPORT +# define Q_WIDGETS_EXPORT Q_DECL_EXPORT +# define Q_PRINTSUPPORT_EXPORT Q_DECL_EXPORT # define Q_SQL_EXPORT Q_DECL_EXPORT # define Q_NETWORK_EXPORT Q_DECL_EXPORT # define Q_SVG_EXPORT Q_DECL_EXPORT # define Q_DECLARATIVE_EXPORT Q_DECL_EXPORT +# define Q_QTQUICK1_EXPORT Q_DECL_EXPORT # define Q_OPENGL_EXPORT Q_DECL_EXPORT # define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT # define Q_OPENVG_EXPORT Q_DECL_EXPORT @@ -1402,10 +1411,13 @@ class QDataStream; # else # define Q_CORE_EXPORT # define Q_GUI_EXPORT +# define Q_WIDGETS_EXPORT +# define Q_PRINTSUPPORT_EXPORT # define Q_SQL_EXPORT # define Q_NETWORK_EXPORT # define Q_SVG_EXPORT # define Q_DECLARATIVE_EXPORT +# define Q_QTQUICK1_EXPORT # define Q_OPENGL_EXPORT # define Q_MULTIMEDIA_EXPORT # define Q_OPENVG_EXPORT @@ -1433,6 +1445,16 @@ class QDataStream; # else # define Q_GUI_EXPORT_INLINE inline # endif +# if defined(QT_BUILD_WIDGETS_LIB) +# define Q_WIDGETS_EXPORT_INLINE Q_WIDGETS_EXPORT inline +# else +# define Q_WIDGETS_EXPORT_INLINE inline +# endif +# if defined(QT_BUILD_PRINTSUPPORT_LIB) +# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline +# else +# define Q_PRINTSUPPORT_EXPORT_INLINE inline +# endif # if defined(QT_BUILD_COMPAT_LIB) # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline # else @@ -1444,10 +1466,14 @@ class QDataStream; // note: this affects the contents of the DEF files (ie. these functions do not appear) # define Q_CORE_EXPORT_INLINE inline # define Q_GUI_EXPORT_INLINE inline +# define Q_WIDGETS_EXPORT_INLINE inline +# define Q_PRINTSUPPORT_EXPORT_INLINE inline # define Q_COMPAT_EXPORT_INLINE inline #else # define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline # define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline +# define Q_WIDGETS_EXPORT_INLINE Q_WIDGETS_EXPORT inline +# define Q_PRINTSUPPORT_EXPORT_INLINE Q_PRINTSUPPORT_EXPORT inline # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline #endif @@ -1531,7 +1557,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, @@ -2017,6 +2043,7 @@ static inline bool qIsNull(float f) return false; \ } #else + # define Q_DUMMY_COMPARISON_OPERATOR(C) #endif diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 9253b19e60..a4b9cf1777 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -237,13 +237,13 @@ public: Window = 0x00000001, Dialog = 0x00000002 | Window, Sheet = 0x00000004 | Window, - Drawer = 0x00000006 | Window, + Drawer = Sheet | Dialog, Popup = 0x00000008 | Window, - Tool = 0x0000000a | Window, - ToolTip = 0x0000000c | Window, - SplashScreen = 0x0000000e | Window, + Tool = Popup | Dialog, + ToolTip = Popup | Sheet, + SplashScreen = ToolTip | Dialog, Desktop = 0x00000010 | Window, - SubWindow = 0x00000012, + SubWindow = 0x00000012, WindowType_Mask = 0x000000ff, MSWindowsFixedSizeDialogHint = 0x00000100, @@ -258,13 +258,7 @@ public: WindowContextHelpButtonHint = 0x00010000, WindowShadeButtonHint = 0x00020000, WindowStaysOnTopHint = 0x00040000, - // reserved for Qt3Support: - // WMouseNoMask = 0x00080000, - // WDestructiveClose = 0x00100000, - // WStaticContents = 0x00200000, - // WGroupLeader = 0x00400000, - // WShowModal = 0x00800000, - // WNoMousePropagation = 0x01000000, + CustomizeWindowHint = 0x02000000, WindowStaysOnBottomHint = 0x04000000, WindowCloseButtonHint = 0x08000000, @@ -1240,23 +1234,37 @@ public: }; enum InputMethodQuery { - ImMicroFocus, - ImFont, - ImCursorPosition, - ImSurroundingText, - ImCurrentSelection, - ImMaximumTextLength, - ImAnchorPosition - }; + ImEnabled = 0x1, + ImCursorRectangle = 0x2, + ImMicroFocus = 0x2, // deprecated + ImFont = 0x4, + ImCursorPosition = 0x8, + ImSurroundingText = 0x10, + ImCurrentSelection = 0x20, + ImMaximumTextLength = 0x40, + ImAnchorPosition = 0x80, + ImHints = 0x100, + ImPreferredLanguage = 0x200, + + ImPlatformData = 0x80000000, + ImQueryAll = 0xffffffff + }; + Q_DECLARE_FLAGS(InputMethodQueries, InputMethodQuery) enum InputMethodHint { ImhNone = 0x0, + ImhHiddenText = 0x1, - ImhNoAutoUppercase = 0x2, - ImhPreferNumbers = 0x4, - ImhPreferUppercase = 0x8, - ImhPreferLowercase = 0x10, - ImhNoPredictiveText = 0x20, + ImhSensitiveData = 0x2, + ImhNoAutoUppercase = 0x4, + ImhPreferNumbers = 0x8, + ImhPreferUppercase = 0x10, + ImhPreferLowercase = 0x20, + ImhNoPredictiveText = 0x40, + + ImhDate = 0x80, + ImhTime = 0x100, + ImhMultiLine = 0x200, ImhDigitsOnly = 0x10000, ImhFormattedNumbersOnly = 0x20000, diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h index 738026a9ed..0926e02af1 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_ |