diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-25 11:45:23 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-01-25 11:45:23 +0100 |
commit | acf7f38b2b4a5d6427dca9b6538e3394cfde2d94 (patch) | |
tree | fcd5eeb1006b01a4596cce5956bfe32f3c055d29 /src/core/render_widget_host_view_qt.cpp | |
parent | c2447a308882ba3691d66b2c28df197f571518c7 (diff) | |
parent | 349ef9870917e8cf2c189fed4a970023b19ba24a (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/3rdparty
tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
Change-Id: I070173576fc4be53689ce0dd9e1fd4133f5814da
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index fef3831e3..0d153dec2 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -116,7 +116,7 @@ static inline Qt::InputMethodHints toQtInputMethodHints(ui::TextInputType inputT case ui::TEXT_INPUT_TYPE_SEARCH: return Qt::ImhPreferLowercase | Qt::ImhNoAutoUppercase; case ui::TEXT_INPUT_TYPE_PASSWORD: - return Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase; + return Qt::ImhSensitiveData | Qt::ImhNoPredictiveText | Qt::ImhNoAutoUppercase | Qt::ImhHiddenText; case ui::TEXT_INPUT_TYPE_EMAIL: return Qt::ImhEmailCharactersOnly; case ui::TEXT_INPUT_TYPE_NUMBER: @@ -575,6 +575,7 @@ void RenderWidgetHostViewQt::TextInputStateChanged(const content::TextInputState { m_currentInputType = params.type; m_delegate->inputMethodStateChanged(params.type != ui::TEXT_INPUT_TYPE_NONE); + m_delegate->setInputMethodHints(toQtInputMethodHints(params.type)); } void RenderWidgetHostViewQt::ImeCancelComposition() @@ -1115,7 +1116,10 @@ void RenderWidgetHostViewQt::handleInputMethodEvent(QInputMethodEvent *ev) QGuiApplication::postEvent(qApp->focusObject(), eventCopy); } else { m_receivedEmptyImeText = false; - m_host->ImeCancelComposition(); + if (m_imeInProgress) { + m_imeInProgress = false; + m_host->ImeCancelComposition(); + } } } } |