summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
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);