diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-09 22:00:15 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-09 22:00:15 (GMT) |
commit | c4876f7b430246d4158528392a7a6f58bb87b23e (patch) | |
tree | 5893e5433dbd3f7c9bcbdb61c46e5be9298cf313 /src/gui/kernel/qwidget.cpp | |
parent | e1fead7c4f877308c2cc11131c445a1f7085baf7 (diff) | |
parent | 4809920df3c3329d47f595c1287ab44b454abb88 (diff) | |
download | Qt-c4876f7b430246d4158528392a7a6f58bb87b23e.zip Qt-c4876f7b430246d4158528392a7a6f58bb87b23e.tar.gz Qt-c4876f7b430246d4158528392a7a6f58bb87b23e.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 2f85cd0..f7c795e 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -273,6 +273,9 @@ QWidgetPrivate::QWidgetPrivate(int version) , isMoved(0) , isGLWidget(0) , usesDoubleBufferedGLContext(0) +#ifndef QT_NO_IM + , inheritsInputMethodHints(0) +#endif #if defined(Q_WS_X11) , picture(0) #elif defined(Q_WS_WIN) @@ -9228,9 +9231,13 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const */ Qt::InputMethodHints QWidget::inputMethodHints() const { - Q_D(const QWidget); #ifndef QT_NO_IM - return d->imHints; + const QWidgetPrivate *priv = d_func(); + while (priv->inheritsInputMethodHints) { + priv = priv->q_func()->parentWidget()->d_func(); + Q_ASSERT(priv); + } + return priv->imHints; #else //QT_NO_IM return 0; #endif //QT_NO_IM |