From 5227ca6ffee3afa2e5c5d7450d80a6ebda44470b Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 12 Sep 2011 21:54:24 +0300 Subject: Add new composite Qt::ImQueryInput query When cursor position or editor text changes many input method query attributes like cursor rectangle, cursor position, surrounding text, current selection and anchor position change as well. Checking in text control and editor classes what of those related attributes have exactly changed before calling the update increases code complexity unnecessarily for a little benefit. Qt::InputMethodQueries flag can still be used to optimize more independent cases when attributes change individually, which is more common for input methods hints, fonts, platform data, maximum length or enabled attributes. Change-Id: Ic9eee5f1edb6d33ef6c01d2c9c8ad582100c0150 Reviewed-on: http://codereview.qt-project.org/4739 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/corelib/global/qnamespace.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index a4b9cf1777..43e6176811 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1247,6 +1247,8 @@ public: ImPreferredLanguage = 0x200, ImPlatformData = 0x80000000, + ImQueryInput = ImCursorRectangle | ImCursorPosition | ImSurroundingText | + ImCurrentSelection | ImAnchorPosition, ImQueryAll = 0xffffffff }; Q_DECLARE_FLAGS(InputMethodQueries, InputMethodQuery) -- cgit v1.2.3