Pass Qt::ImQueryInput instead of Qt::CursorRectangle in QSgItem::updateMicroFocus...
authorJoona Petrell <joona.t.petrell@nokia.com>
Mon, 12 Sep 2011 18:48:40 +0000 (21:48 +0300)
committerQt by Nokia <qt-info@nokia.com>
Thu, 15 Sep 2011 08:22:43 +0000 (10:22 +0200)
QPlatformInputContext::update() function takes QInputMethodQueries flag as a parameter.
When cursor rectangle changes many input method query attributes like
cursor rectangle, cursor position, surrounding text, current selection and a
position change as well. New composite query ImQueryInput encapsulates this.

Change-Id: I83b17507f22fcbec0d8ed50588c67794d62f9495
Reviewed-on: http://codereview.qt-project.org/4741
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>

src/declarative/items/qsgitem.cpp

index f3de1a6..a1e4317 100644 (file)
@@ -2937,7 +2937,7 @@ void QSGItem::updateMicroFocus()
 {
     QInputPanel *p = qApp->inputPanel();
     if (p->inputItem() == this)
-        qApp->inputPanel()->update(Qt::ImCursorRectangle);
+        qApp->inputPanel()->update(Qt::ImQueryInput);
 }
 
 QVariant QSGItem::inputMethodQuery(Qt::InputMethodQuery query) const