diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index 746328d19c..d82d92aa8d 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -514,6 +514,13 @@ void InputMethod::updateSni() setEnabled(!m_enabled); } ); + + QMenu *sniMenu = new QMenu; + sniMenu->addAction(i18n("Configure virtual keyboards..."), this, [] { + QProcess::startDetached("systemsettings5", {"kcm_virtualkeyboard"}); + }); + + m_sni->setContextMenu(sniMenu); } m_sni->setStandardActionsEnabled(false); m_sni->setCategory(KStatusNotifierItem::Hardware); @@ -521,13 +528,6 @@ void InputMethod::updateSni() m_sni->setTitle(i18n("Virtual Keyboard")); m_sni->setToolTipTitle(i18n("Whether to show the virtual keyboard on demand.")); - QMenu *sniMenu = new QMenu; - sniMenu->addAction(i18n("Configure virtual keyboards..."), this, [] { - QProcess::startDetached("systemsettings5", {"kcm_virtualkeyboard"}); - }); - - m_sni->setContextMenu(sniMenu); - if (m_enabled) { m_sni->setIconByName(QStringLiteral("input-keyboard-virtual-on")); m_sni->setTitle(i18n("Virtual Keyboard: enabled"));