reimplemented doUpdateMicroFocus to work without calling the base implementation
authorMatthew Cattell <matthew.cattell@nokia.com>
Wed, 28 Sep 2011 11:52:59 +0000 (13:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Sep 2011 17:40:34 +0000 (19:40 +0200)
Change-Id: Ic96ab2bb93248e6d3ba1c8b789ed3c21f8ad39bd
Reviewed-on: http://codereview.qt-project.org/5716
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp

index 2d62917..ce099e0 100644 (file)
@@ -10393,7 +10393,17 @@ public:
 
     void doUpdateMicroFocus()
     {
-        updateMicroFocus();
+        if (QWidget *fw = QApplication::focusWidget()) {
+            if (scene()) {
+                for (int i = 0 ; i < scene()->views().count() ; ++i) {
+                    if (scene()->views().at(i) == fw) {
+                        if (QInputContext *inputContext = fw->inputContext()) {
+                            inputContext->update();
+                        }
+                    }
+                }
+            }
+        }
     }
 };