From 368a3a736c8dbe945cd820b78523191522351494 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 29 Mar 2012 16:34:09 +1000 Subject: Set cursorVisible to false when im cursor length is 0. If the length of the QInputMethodEvent::Cursor attribute is 0 the cursor is supposed to be hidden. To ensure this and any other IM state is reverted when the input method is reset send a empty event to the editor when preedit is cancelled or removed and count formatting or cursor changes when determining if the input method is composing (i.e has state that needs to be reset). Change-Id: Ifca69aa0c18776b1aef355ed6ae9aecc40b9d475 Reviewed-by: Yann Bodson --- src/quick/items/qquicktextcontrol_p_p.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/quick/items/qquicktextcontrol_p_p.h') diff --git a/src/quick/items/qquicktextcontrol_p_p.h b/src/quick/items/qquicktextcontrol_p_p.h index c5a39cc759..3a10f007be 100644 --- a/src/quick/items/qquicktextcontrol_p_p.h +++ b/src/quick/items/qquicktextcontrol_p_p.h @@ -127,6 +127,7 @@ public: bool isPreediting() const; void commitPreedit(); + void cancelPreedit(); QPointF trippleClickPoint; QPointF mousePressPos; @@ -155,11 +156,12 @@ public: bool ignoreAutomaticScrollbarAdjustement : 1; bool overwriteMode : 1; bool acceptRichText : 1; - bool hideCursor : 1; // used to hide the cursor in the preedit area + bool cursorVisible : 1; // used to hide the cursor in the preedit area bool hasFocus : 1; bool isEnabled : 1; bool hadSelectionOnMousePress : 1; bool wordSelectionEnabled : 1; + bool hasImState : 1; void _q_copyLink(); void _q_updateBlock(const QTextBlock &); -- cgit v1.2.3