summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladv@rosedu.org>2012-03-24 19:01:50 (GMT)
committervlad <vlad@tyrion.(none)>2012-10-13 13:55:45 (GMT)
commita76c9f9903a9823a659d8fd06b41cc87a9a34077 (patch)
tree28522e23fc5ad0343e7e0363cc726dd202f22141
parent5f745ebd56014a68695ac4b6fe7fb5dc96e34384 (diff)
downloadswift-contrib-a76c9f9903a9823a659d8fd06b41cc87a9a34077.zip
swift-contrib-a76c9f9903a9823a659d8fd06b41cc87a9a34077.tar.bz2
Fixed link failure when hunspell is not installedvladv/spell_checker
-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
}
}