diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-06-29 03:32:38 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-06-29 03:32:38 (GMT) |
commit | c0502481e49ea2c72a767a80fafdb51f8a135c98 (patch) | |
tree | 3961188a702360a56a1223b8323f2a60e41b15b2 /src/gui/graphicsview/qgraphicsitem.cpp | |
parent | 189d2660968368532761586ffd495eb6c18cdbdf (diff) | |
download | Qt-c0502481e49ea2c72a767a80fafdb51f8a135c98.zip Qt-c0502481e49ea2c72a767a80fafdb51f8a135c98.tar.gz Qt-c0502481e49ea2c72a767a80fafdb51f8a135c98.tar.bz2 |
Ensure micro focus is updated in TextEdit and TextInput
Task-number: QTBUG-11552
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 2de3638..8a419b4 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -7312,10 +7312,13 @@ void QGraphicsItem::updateMicroFocus() { #if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) if (QWidget *fw = QApplication::focusWidget()) { - for (int i = 0 ; i < scene()->views().count() ; ++i) - if (scene()->views().at(i) == fw) - if (QInputContext *inputContext = fw->inputContext()) - inputContext->update(); + if (scene()) { + for (int i = 0 ; i < scene()->views().count() ; ++i) { + if (scene()->views().at(i) == fw) + if (QInputContext *inputContext = fw->inputContext()) + inputContext->update(); + } + } #ifndef QT_NO_ACCESSIBILITY // ##### is this correct QAccessible::updateAccessibility(fw, 0, QAccessible::StateChanged); |