From c927bcdab47486ae4322585e9b2ea7f9b07b2837 Mon Sep 17 00:00:00 2001 From: Qijia Liu Date: Wed, 6 Nov 2024 08:55:33 -0500 Subject: [PATCH] move SpellModuleFactory to header (#1171) --- src/modules/spell/spell.cpp | 7 ------- src/modules/spell/spell.h | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/modules/spell/spell.cpp b/src/modules/spell/spell.cpp index cc3d951f..a4229234 100644 --- a/src/modules/spell/spell.cpp +++ b/src/modules/spell/spell.cpp @@ -7,7 +7,6 @@ #include "spell.h" #include "fcitx-config/iniparser.h" -#include "fcitx/addonmanager.h" #include "config.h" #include "spell-custom.h" #ifdef ENABLE_ENCHANT @@ -110,12 +109,6 @@ Spell::hintForDisplay(const std::string &language, SpellProvider provider, return iter->second->hint(language, word, limit); } - -class SpellModuleFactory : public AddonFactory { - AddonInstance *create(AddonManager *manager) override { - return new Spell(manager->instance()); - } -}; } // namespace fcitx FCITX_ADDON_FACTORY(fcitx::SpellModuleFactory) diff --git a/src/modules/spell/spell.h b/src/modules/spell/spell.h index 60778962..3cfa2db5 100644 --- a/src/modules/spell/spell.h +++ b/src/modules/spell/spell.h @@ -13,6 +13,7 @@ #include "fcitx-utils/i18n.h" #include "fcitx/addonfactory.h" #include "fcitx/addoninstance.h" +#include "fcitx/addonmanager.h" #include "fcitx/instance.h" #include "spell_public.h" @@ -104,6 +105,12 @@ class SpellBackend { private: Spell *parent_; }; + +class SpellModuleFactory : public AddonFactory { + AddonInstance *create(AddonManager *manager) override { + return new Spell(manager->instance()); + } +}; } // namespace fcitx #endif // _FCITX_MODULES_SPELL_SPELL_H_