From a76c9f9903a9823a659d8fd06b41cc87a9a34077 Mon Sep 17 00:00:00 2001
From: Vlad Voicu <vladv@rosedu.org>
Date: Sat, 24 Mar 2012 21:01:50 +0200
Subject: Fixed link failure when hunspell is not installed


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
 	}
 }
 
-- 
cgit v0.10.2-6-g49f6