Skip to content

Commit

Permalink
move SpellModuleFactory to header (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Nov 6, 2024
1 parent 8e9040c commit c927bcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/modules/spell/spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
7 changes: 7 additions & 0 deletions src/modules/spell/spell.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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_

0 comments on commit c927bcd

Please sign in to comment.