summaryrefslogtreecommitdiffstats
path: root/src/core/render_widget_host_view_qt.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2018-11-23 09:22:38 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2018-12-07 15:45:28 +0000
commit43840350a1597d58116c36137c046ef595c57ed4 (patch)
tree0a15cb2d7f0ad52878cd98377e1a05d8d5b2c7fd /src/core/render_widget_host_view_qt.cpp
parent29cbf8fd44bd2e27db1e3d569c6e3680b6d34f5f (diff)
Disable text prediction for input
This is a workaround to avoid issues with QtVirtualKeyboard when used with QtWebEngine. Task-number: QTBUG-70158 Task-number: QTBUG-71995 Change-Id: I1e6fcd4dceb131dbe781dd7ab3856cb154ac6a18 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/render_widget_host_view_qt.cpp')
-rw-r--r--src/core/render_widget_host_view_qt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 2326dbdf7..99bda12d1 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -754,7 +754,7 @@ void RenderWidgetHostViewQt::OnUpdateTextInputStateCalled(content::TextInputMana
}
ui::TextInputType type = getTextInputType();
- m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()));
+ m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText);
m_surroundingText = QString::fromStdString(state->value);
// Remove IME composition text from the surrounding text
@@ -1112,7 +1112,7 @@ QVariant RenderWidgetHostViewQt::inputMethodQuery(Qt::InputMethodQuery query)
// TODO: Implement this
return QVariant(); // No limit.
case Qt::ImHints:
- return int(toQtInputMethodHints(getTextInputType()));
+ return int(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText);
default:
return QVariant();
}