From fee009bcf915b556eb3c9695b02ae6f23d9a23c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 19 Apr 2011 13:28:31 +0200 Subject: WIP Qt 5 API. (cherry picked from commit ad12d5babcdc2bad3f2c0fb9fd352ab79c197aa1) --- src/corelib/global/qnamespace.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 75ce68afbf..e5c19fba72 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -271,13 +271,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 = Desktop | Dialog, WindowType_Mask = 0x000000ff, MSWindowsFixedSizeDialogHint = 0x00000100, -- cgit v1.2.3 From 45272d5e458e0b118f340daa7e89b6180e6dd426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 27 Apr 2011 10:50:04 +0200 Subject: Get rid of QWindow::WindowType and clean up Qt::WindowFlags instead. (cherry picked from commit 72176bf2a490d2f831d53a66a0987213efa60935) --- src/corelib/global/qnamespace.h | 58 +---------------------------------------- 1 file changed, 1 insertion(+), 57 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index e5c19fba72..252af2caf6 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -292,13 +292,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, @@ -308,56 +302,6 @@ public: WindowCancelButtonHint = 0x00100000, WindowSoftkeysVisibleHint = 0x40000000, WindowSoftkeysRespondHint = 0x80000000 - -#ifdef QT3_SUPPORT - , - WMouseNoMask = 0x00080000, - WDestructiveClose = 0x00100000, - WStaticContents = 0x00200000, - WGroupLeader = 0x00400000, - WShowModal = 0x00800000, - WNoMousePropagation = 0x01000000, - - WType_TopLevel = Window, - WType_Dialog = Dialog, - WType_Popup = Popup, - WType_Desktop = Desktop, - WType_Mask = WindowType_Mask, - - WStyle_Customize = 0, - WStyle_NormalBorder = 0, - WStyle_DialogBorder = MSWindowsFixedSizeDialogHint, - WStyle_NoBorder = FramelessWindowHint, - WStyle_Title = WindowTitleHint, - WStyle_SysMenu = WindowSystemMenuHint, - WStyle_Minimize = WindowMinimizeButtonHint, - WStyle_Maximize = WindowMaximizeButtonHint, - WStyle_MinMax = WStyle_Minimize | WStyle_Maximize, - WStyle_Tool = Tool, - WStyle_StaysOnTop = WindowStaysOnTopHint, - WStyle_ContextHelp = WindowContextHelpButtonHint, - - // misc flags - WPaintDesktop = 0, - WPaintClever = 0, - - WX11BypassWM = X11BypassWindowManagerHint, - WWinOwnDC = MSWindowsOwnDC, - WMacSheet = Sheet, - WMacDrawer = Drawer, - - WStyle_Splash = SplashScreen, - - WNoAutoErase = 0, - WRepaintNoErase = 0, - WNorthWestGravity = WStaticContents, - WType_Modal = Dialog | WShowModal, - WStyle_Dialog = Dialog, - WStyle_NoBorderEx = FramelessWindowHint, - WResizeNoErase = 0, - WMacNoSheet = 0 -#endif - }; Q_DECLARE_FLAGS(WindowFlags, WindowType) -- cgit v1.2.3 From f86334a0155ad38138a012c7f9e54c25206abebd Mon Sep 17 00:00:00 2001 From: Olli Werwolff Date: Tue, 24 May 2011 09:14:43 +0200 Subject: Make QtCore compile with on Windows when -qpa is used Core functionality almost never is window system dependent. Reviewed-by: Friedemann Kleint --- src/corelib/global/qglobal.h | 12 +++++++----- src/corelib/global/qt_pch.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index a16bf2599d..2745f761b5 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -856,7 +856,9 @@ namespace QT_NAMESPACE {} WIN16 - unsupported */ -#if defined(Q_OS_MSDOS) +#if defined (Q_WS_QPA) + +#elif defined(Q_OS_MSDOS) # define Q_WS_WIN16 # error "Qt requires Win32 and does not work with Windows 3.x" #elif defined(_WIN32_X11_) @@ -1139,7 +1141,7 @@ redefine to built-in booleans to make autotests work properly */ //defines the type for the WNDPROC on windows //the alignment needs to be forced for sse2 to not crash with mingw -#if defined(Q_WS_WIN) +#if defined(Q_OS_WIN) # if defined(Q_CC_MINGW) # define QT_ENSURE_STACK_ALIGNED_FOR_SSE __attribute__ ((force_align_arg_pointer)) # else @@ -1560,7 +1562,7 @@ public: #else # error "Qt not configured correctly, please run configure" #endif -#if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN) +#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) enum WinVersion { WV_32s = 0x0001, WV_95 = 0x0002, @@ -1669,7 +1671,7 @@ inline QT3_SUPPORT bool qSysInfo(int *wordSize, bool *bigEndian) } #endif -#if defined(Q_WS_WIN) || defined(Q_OS_CYGWIN) +#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) #if defined(QT3_SUPPORT) inline QT3_SUPPORT bool qt_winUnicode() { return true; } inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; } @@ -1679,7 +1681,7 @@ inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; } #define QT_WA(unicode, ansi) unicode #define QT_WA_INLINE(unicode, ansi) (unicode) -#endif /* Q_WS_WIN */ +#endif /* Q_OS_WIN */ #ifndef Q_OUTOFLINE_TEMPLATE # define Q_OUTOFLINE_TEMPLATE diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h index 8a1004d1cb..2a2e980b22 100644 --- a/src/corelib/global/qt_pch.h +++ b/src/corelib/global/qt_pch.h @@ -50,7 +50,7 @@ #if defined __cplusplus #include -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN # define _POSIX_ # include # undef _POSIX_ -- cgit v1.2.3 From ef8e5af1d219dd749ea306230cfd097cc2595cb4 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 27 May 2011 16:06:53 +0200 Subject: The proper fix for subwindow parenting issues. The previous patch tried to work around the fact that Qt::SubWindow accidentally pulled in Qt::Window. This patch corrects the root cause of the problem. --- src/corelib/global/qnamespace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 70f13cf79f..4a663fc8a5 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -278,7 +278,7 @@ public: ToolTip = Popup | Sheet, SplashScreen = ToolTip | Dialog, Desktop = 0x00000010 | Window, - SubWindow = Desktop | Dialog, + SubWindow = 0x00000012, WindowType_Mask = 0x000000ff, MSWindowsFixedSizeDialogHint = 0x00000100, -- cgit v1.2.3 From 819f9ca965279562f34895dab405f28162c0b8ab Mon Sep 17 00:00:00 2001 From: Olli Werwolff Date: Wed, 8 Jun 2011 09:51:07 +0200 Subject: Use Q_WIDGETS_EXPORT for widgets library Reviewed-by: Lars Knoll --- src/corelib/global/qglobal.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 79defc4277..1c82003b1c 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1299,6 +1299,11 @@ 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_SQL_LIB) # define Q_SQL_EXPORT Q_DECL_EXPORT # else @@ -1383,6 +1388,7 @@ 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_SQL_EXPORT Q_DECL_IMPORT # define Q_NETWORK_EXPORT Q_DECL_IMPORT # define Q_SVG_EXPORT Q_DECL_IMPORT @@ -1415,6 +1421,7 @@ 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_SQL_EXPORT Q_DECL_EXPORT # define Q_NETWORK_EXPORT Q_DECL_EXPORT # define Q_SVG_EXPORT Q_DECL_EXPORT @@ -1433,6 +1440,7 @@ class QDataStream; # else # define Q_CORE_EXPORT # define Q_GUI_EXPORT +# define Q_WIDGETS_EXPORT # define Q_SQL_EXPORT # define Q_NETWORK_EXPORT # define Q_SVG_EXPORT @@ -1463,6 +1471,11 @@ 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_COMPAT_LIB) # define Q_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline # else @@ -1474,10 +1487,12 @@ 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_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_COMPAT_EXPORT_INLINE Q_COMPAT_EXPORT inline #endif -- cgit v1.2.3 From 407a6fe79824b722dbc1224a1be29d26b8fdb729 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 21 Jun 2011 16:45:00 +0200 Subject: add QInputMethodQueryEvent QInputMethodQueryEvent will replace the old inputMethodHints() and inputMethodQuery() APIs in QWidget. It has the advantage that it works nicely with any kind of QObject. --- src/corelib/global/qnamespace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 4a663fc8a5..38d4a85b89 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1488,7 +1488,8 @@ public: ImSurroundingText, ImCurrentSelection, ImMaximumTextLength, - ImAnchorPosition + ImAnchorPosition, + ImHints }; enum InputMethodHint { -- cgit v1.2.3 From 4ed17a650847d4ad129478608e9697c909126263 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Tue, 5 Jul 2011 15:02:39 +0200 Subject: Start porting the Mac menu system to QPA. Global changes: qglobal.h: remove code that sets Q_WS_MAC and Q_MAC_USE_COCOA - this is dead code now. Add qt_widget_helpers_mac_p.h/mm which will contain helper functions needed for widgets on Qt 5. Menu-related changes: Set AA_DontUseNativeMenuBar before creating the platform plugin. Change Q_WS_MAC to Q_OS_MAC in the menu code. Remove Q_MAC_USE_COCOA defines and Carbon code paths. Move some qt_mac helper functions only used by the menu system to qmenu_mac.mm. #ifdef out some code paths that require further porting. Native menus are now disabled by default but can be enabled by the QPA plugins that want them by clearing AA_DontUseNativeMenuBar. Since we at compile time don't know which plugin will be loaded the Mac menu code is always included when building on OS X. (The above is currently only relevant for the Cocoa plugin.) --- src/corelib/global/qglobal.h | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1c82003b1c..4fa6a9954b 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -272,7 +272,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 @@ -281,15 +281,6 @@ namespace QT_NAMESPACE {} # endif #endif -#ifdef QT_AUTODETECT_COCOA -# ifdef Q_OS_MAC64 -# define QT_MAC_USE_COCOA 1 -# define QT_BUILD_KEY QT_BUILD_KEY_COCOA -# else -# define QT_BUILD_KEY QT_BUILD_KEY_CARBON -# 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,15 +868,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 -- cgit v1.2.3 From 2e95ce7459c98f17f5b8d0c983bfb32102fd9932 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 19 Aug 2011 10:39:45 +0200 Subject: Fix build. - Introduced EXPORT definition for new QPrintSupport library. - Fixed dependencies in src.pro - Fixed some includes. Change-Id: I9863233ca2767928b37cf3fd1fdec31351b5da6b Reviewed-on: http://codereview.qt.nokia.com/3253 Reviewed-by: Qt Sanity Bot Reviewed-by: Friedemann Kleint --- src/corelib/global/qglobal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 2f6f33efca..94e0197a4a 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1265,6 +1265,11 @@ class QDataStream; # 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 @@ -1350,6 +1355,7 @@ class QDataStream; # 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 @@ -1383,6 +1389,7 @@ class QDataStream; # 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 @@ -1402,6 +1409,7 @@ class QDataStream; # 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 @@ -1437,6 +1445,11 @@ class QDataStream; # 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 @@ -1449,11 +1462,13 @@ class QDataStream; # 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 @@ -2023,6 +2038,7 @@ static inline bool qIsNull(float f) return false; \ } #else + # define Q_DUMMY_COMPARISON_OPERATOR(C) #endif -- cgit v1.2.3 From 090ee21eac7257644422e35395194e5fd7fb8efa Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 31 Aug 2011 16:04:51 +0200 Subject: Introduce Q_QTQUICK1_EXPORT fixing exports in declarative. Change-Id: Id70c6792b5342074ef78944e7e28bd9c9b83c107 Reviewed-on: http://codereview.qt.nokia.com/3983 Reviewed-by: Friedemann Kleint --- src/corelib/global/qglobal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 94e0197a4a..c3e85ac0b1 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1285,6 +1285,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 @@ -1360,6 +1365,7 @@ class QDataStream; # 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 @@ -1394,6 +1400,7 @@ class QDataStream; # 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 @@ -1414,6 +1421,7 @@ class QDataStream; # 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_XML_EXPORT -- cgit v1.2.3 From a30d4162ddb30b62b8d003b099d3ca8ae0b0ed0b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 5 Sep 2011 12:53:33 +0200 Subject: Refactor the input framework Results of the ongoing workshop in Oslo: QInputPanel will be the application facing interface for controlling the input context as well as querying things like the position of the virtual keyboard. QInputContext is significantly cleaned up and only there as a compatibility API for existing code. Change-Id: Ie8e2ee480930763f414bfaae63247b1fb6500c82 Reviewed-on: http://codereview.qt.nokia.com/4357 Reviewed-by: Qt Sanity Bot Reviewed-by: Vesa Rantanen Reviewed-by: Joona Petrell Reviewed-by: Lars Knoll --- src/corelib/global/qnamespace.h | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 2fc82c55ca..740579b11d 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1234,24 +1234,36 @@ public: }; enum InputMethodQuery { - ImMicroFocus, - ImFont, - ImCursorPosition, - ImSurroundingText, - ImCurrentSelection, - ImMaximumTextLength, - ImAnchorPosition, - ImHints - }; + ImEnabled = 0x1, + ImMicroFocus = 0x2, + 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, -- cgit v1.2.3 From 6f65a55fa9a5bf8a547dff2893d49ab405a16af0 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 8 Sep 2011 10:57:54 +0200 Subject: Rename ImMicroFocus to ImCursorRectangle Also set ImhMultiLine on QTextEdit Change-Id: I04a5a1d69c2048ea94c24210e2b8374f334be1b6 Reviewed-on: http://codereview.qt-project.org/4414 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/corelib/global/qnamespace.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 740579b11d..a4b9cf1777 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1235,7 +1235,8 @@ public: enum InputMethodQuery { ImEnabled = 0x1, - ImMicroFocus = 0x2, + ImCursorRectangle = 0x2, + ImMicroFocus = 0x2, // deprecated ImFont = 0x4, ImCursorPosition = 0x8, ImSurroundingText = 0x10, -- cgit v1.2.3