summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-15 12:42:55 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-18 22:20:05 +0000
commit6c4a1914e01bde6191c64a306a47046c736e4e1c (patch)
tree903dba65e74f16ecbc7cf454abc1be8887128603 /src/plugins
parent4e30001e5f6cd5e2127d4b1e7ef0f3b54c70e163 (diff)
Hide ibus IM on password fields
We haven't hooked on any of the properties to tell ibus IMs the type of field or that it should be hidden, so hide it like is standard. Change-Id: Iaa64c669f7162b60c16971ec962101b974108e65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp11
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index 6df454adb0..9675d828e7 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -136,6 +136,17 @@ bool QIBusPlatformInputContext::isValid() const
return d->valid && d->busConnected;
}
+bool QIBusPlatformInputContext::hasCapability(Capability capability) const
+{
+ switch (capability) {
+ case QPlatformInputContext::HiddenTextCapability:
+ return false; // QTBUG-40691, do not show IME on desktop for password entry fields.
+ default:
+ break;
+ }
+ return true;
+}
+
void QIBusPlatformInputContext::invokeAction(QInputMethod::Action a, int)
{
if (!d->busConnected)
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
index 94fa5c3d60..7baa9ad1da 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
@@ -95,6 +95,7 @@ public:
void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE;
bool filterEvent(const QEvent *event) Q_DECL_OVERRIDE;
QLocale locale() const Q_DECL_OVERRIDE;
+ bool hasCapability(Capability capability) const Q_DECL_OVERRIDE;
public Q_SLOTS:
void commitText(const QDBusVariant &text);