aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput_p_p.h
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-03-29 16:34:09 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-02 10:45:55 +0200
commit368a3a736c8dbe945cd820b78523191522351494 (patch)
tree76299394a65073e52920b0d8114d8574b51ae249 /src/quick/items/qquicktextinput_p_p.h
parent9cddbbff9da88ba9c889ae1f306e837c3a66377e (diff)
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 <yann.bodson@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextinput_p_p.h')
-rw-r--r--src/quick/items/qquicktextinput_p_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index 74efdcf469..1bc2cf548b 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -115,7 +115,7 @@ public:
, selectPressed(false)
, textLayoutDirty(true)
, persistentSelection(false)
- , m_hideCursor(false)
+ , hasImState(false)
, m_separator(0)
, m_readOnly(0)
, m_textDirty(0)
@@ -245,7 +245,7 @@ public:
bool selectPressed:1;
bool textLayoutDirty:1;
bool persistentSelection:1;
- bool m_hideCursor : 1; // used to hide the m_cursor inside preedit areas
+ bool hasImState : 1;
bool m_separator : 1;
bool m_readOnly : 1;
bool m_textDirty : 1;
@@ -319,6 +319,7 @@ public:
#endif
void commitPreedit();
+ void cancelPreedit();
Qt::CursorMoveStyle cursorMoveStyle() const { return m_textLayout.cursorMoveStyle(); }
void setCursorMoveStyle(Qt::CursorMoveStyle style) { m_textLayout.setCursorMoveStyle(style); }