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>
This commit is contained in:
parent
4e30001e5f
commit
6c4a1914e0
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user