@@ -69,6 +69,7 @@ class InputMethodManagerPrivate : QPtrHolder<InputMethodManager> {
6969 Instance *instance_ = nullptr ;
7070 std::unique_ptr<HandlerTableEntry<EventHandler>> eventWatcher_;
7171 int64_t timestamp_ = 0 ;
72+ std::vector<std::string> missingInputMethods_;
7273};
7374
7475bool checkEntry (const InputMethodEntry &entry,
@@ -111,6 +112,7 @@ void InputMethodManagerPrivate::loadConfig(
111112 FCITX_WARN () << " Group Item " << item.name .value ()
112113 << " in group " << groupConfig.name .value ()
113114 << " is not valid. Removed." ;
115+ missingInputMethods_.push_back (item.name .value ());
114116 continue ;
115117 }
116118 group.inputMethodList ().emplace_back (
@@ -236,6 +238,7 @@ void InputMethodManager::load(const std::function<void(InputMethodManager &)>
236238 d->loadStaticEntries (addonNames);
237239 d->loadDynamicEntries (addonNames);
238240
241+ d->missingInputMethods_ .clear ();
239242 d->loadConfig (buildDefaultGroupCallback);
240243 // groupOrder guarantee to be non-empty at this point.
241244 emit<InputMethodManager::CurrentGroupChanged>(d->groupOrder_ .front ());
@@ -455,6 +458,12 @@ InputMethodManager::entry(const std::string &name) const {
455458 FCITX_D ();
456459 return findValue (d->entries_ , name);
457460}
461+
462+ const std::vector<std::string> &InputMethodManager::missingInputMethods () const {
463+ FCITX_D ();
464+ return d->missingInputMethods_ ;
465+ }
466+
458467bool InputMethodManager::foreachEntries (
459468 const std::function<bool (const InputMethodEntry &entry)> &callback) {
460469 FCITX_D ();
0 commit comments