diff options
author | axis <qt-info@nokia.com> | 2010-10-01 11:25:28 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-10-08 13:03:54 (GMT) |
commit | 4ee912a752a4b7f129e98e180328f1f46f053d4f (patch) | |
tree | 18b991616665a01132dfb068647b1d96a8ab4c1c /src/gui/kernel | |
parent | aa0f3a7745472ea8c9ca43bb7d690a0591bde83b (diff) | |
download | Qt-4ee912a752a4b7f129e98e180328f1f46f053d4f.zip Qt-4ee912a752a4b7f129e98e180328f1f46f053d4f.tar.gz Qt-4ee912a752a4b7f129e98e180328f1f46f053d4f.tar.bz2 |
Added support for using inputMethodHints in QInputDialog edit widget.
AutoTest: Included
Task: QTBUG-13200
RevBy: Denis Dzyubenko
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 11 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index dc0dbf4..330d699 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 diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 4a79dc7..6c89659 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -748,6 +748,9 @@ public: uint isMoved : 1; uint isGLWidget : 1; uint usesDoubleBufferedGLContext : 1; +#ifndef QT_NO_IM + uint inheritsInputMethodHints : 1; +#endif // *************************** Platform specific ************************************ #if defined(Q_WS_X11) // <----------------------------------------------------------- X11 |