diff options
Diffstat (limited to 'Swift')
| -rw-r--r-- | Swift/QtUI/QtTextEdit.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp index cac8bb4..8551f3d 100644 --- a/Swift/QtUI/QtTextEdit.cpp +++ b/Swift/QtUI/QtTextEdit.cpp @@ -204,4 +204,4 @@ void QtTextEdit::setUpSpellChecker() { - SpellCheckerFactory* checkerFactory = new SpellCheckerFactory(); delete checker_; + checker_ = NULL; if (settings_->getSetting(SettingConstants::SPELL_CHECKER)) { @@ -209,7 +209,3 @@ void QtTextEdit::setUpSpellChecker() std::string dictFile = settings_->getSetting(SettingConstants::DICT_FILE); - checker_ = checkerFactory->createSpellChecker(dictPath + dictFile); - delete checkerFactory; - } - else { - checker_ = NULL; + checker_ = SpellCheckerFactory().createSpellChecker(dictPath + dictFile); } |
Swift