From 05f3939cf19092d1782b37ddbbe106a316eed376 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 22 Jul 2021 20:12:54 +0200 Subject: [PATCH] inputmethod: Use the command as the availability metric --- src/inputmethod.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index d8c374cd2e..3dd6f04397 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -586,6 +586,7 @@ void InputMethod::setInputMethodCommand(const QString &command) startInputMethod(); } updateSni(); + Q_EMIT availableChanged(); } void InputMethod::stopInputMethod() @@ -605,7 +606,6 @@ void InputMethod::stopInputMethod() } m_inputMethodProcess->deleteLater(); m_inputMethodProcess = nullptr; - Q_EMIT availableChanged(); } void InputMethod::startInputMethod() @@ -658,7 +658,6 @@ void InputMethod::startInputMethod() } } }); - Q_EMIT availableChanged(); } bool InputMethod::isActive() const { @@ -701,7 +700,7 @@ bool InputMethod::isVisible() const bool InputMethod::isAvailable() const { - return m_inputMethodProcess; + return !m_inputMethodCommand.isEmpty(); } }