Skip to content

Commit c927bcd

Browse files
authored
move SpellModuleFactory to header (#1171)
1 parent 8e9040c commit c927bcd

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/modules/spell/spell.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
#include "spell.h"
99
#include "fcitx-config/iniparser.h"
10-
#include "fcitx/addonmanager.h"
1110
#include "config.h"
1211
#include "spell-custom.h"
1312
#ifdef ENABLE_ENCHANT
@@ -110,12 +109,6 @@ Spell::hintForDisplay(const std::string &language, SpellProvider provider,
110109

111110
return iter->second->hint(language, word, limit);
112111
}
113-
114-
class SpellModuleFactory : public AddonFactory {
115-
AddonInstance *create(AddonManager *manager) override {
116-
return new Spell(manager->instance());
117-
}
118-
};
119112
} // namespace fcitx
120113

121114
FCITX_ADDON_FACTORY(fcitx::SpellModuleFactory)

src/modules/spell/spell.h

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "fcitx-utils/i18n.h"
1414
#include "fcitx/addonfactory.h"
1515
#include "fcitx/addoninstance.h"
16+
#include "fcitx/addonmanager.h"
1617
#include "fcitx/instance.h"
1718
#include "spell_public.h"
1819

@@ -104,6 +105,12 @@ class SpellBackend {
104105
private:
105106
Spell *parent_;
106107
};
108+
109+
class SpellModuleFactory : public AddonFactory {
110+
AddonInstance *create(AddonManager *manager) override {
111+
return new Spell(manager->instance());
112+
}
113+
};
107114
} // namespace fcitx
108115

109116
#endif // _FCITX_MODULES_SPELL_SPELL_H_

0 commit comments

Comments
 (0)