summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/QtUI/QtTextEdit.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp
index 4807f6b..1bfa03f 100644
--- a/Swift/QtUI/QtTextEdit.cpp
+++ b/Swift/QtUI/QtTextEdit.cpp
@@ -191,6 +191,7 @@ void QtTextEdit::addSuggestions(QMenu* menu, QContextMenuEvent* event)
}
+#ifdef HAVE_SPELLCHECKER
void QtTextEdit::setUpSpellChecker()
{
SpellCheckerFactory* checkerFactory = new SpellCheckerFactory();
@@ -205,6 +206,7 @@ void QtTextEdit::setUpSpellChecker()
checker_ = NULL;
}
}
+#endif
void QtTextEdit::spellCheckerSettingsWindow() {
if (!spellCheckerWindow_) {
@@ -223,8 +225,10 @@ void QtTextEdit::handleSettingChanged(const std::string& settings) {
if (settings == SettingConstants::SPELL_CHECKER.getKey()
|| settings == SettingConstants::DICT_PATH.getKey()
|| settings == SettingConstants::DICT_FILE.getKey()) {
+#ifdef HAVE_SPELLCHECKER
setUpSpellChecker();
underlineMisspells();
+#endif
}
}