diff options
| author | Vlad Voicu <vladvoic@gmail.com> | 2011-11-29 02:41:07 (GMT) | 
|---|---|---|
| committer | vlad <vlad@tyrion.(none)> | 2012-10-13 13:55:44 (GMT) | 
| commit | 0a13558efc0ccf0e5afceb63c416d8cb401997ec (patch) | |
| tree | 0fe17d78ecced7389b7f2a3d121b223bbce8dc26 /Swift/QtUI/QtTextEdit.cpp | |
| parent | 5e7be9a49cf540a68275f084e57a6efe8d7c1626 (diff) | |
| download | swift-contrib-0a13558efc0ccf0e5afceb63c416d8cb401997ec.zip swift-contrib-0a13558efc0ccf0e5afceb63c416d8cb401997ec.tar.bz2  | |
Added Factory for creeating SpellCheckers
Diffstat (limited to 'Swift/QtUI/QtTextEdit.cpp')
| -rw-r--r-- | Swift/QtUI/QtTextEdit.cpp | 7 | 
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp index e1fdd26..0d0f31c 100644 --- a/Swift/QtUI/QtTextEdit.cpp +++ b/Swift/QtUI/QtTextEdit.cpp @@ -4,6 +4,7 @@   * See Documentation/Licenses/GPLv3.txt for more information.   */ +#include <SwifTools/SpellCheckerFactory.h>  #include <SwifTools/SpellChecker.h>  #include <Swift/QtUI/QtTextEdit.h> @@ -16,10 +17,12 @@  namespace Swift { -QtTextEdit::QtTextEdit(QWidget* parent) : QTextEdit(parent){ +QtTextEdit::QtTextEdit(QWidget* parent) : QTextEdit(parent) {  	connect(this, SIGNAL(textChanged()), this, SLOT(handleTextChanged()));  	handleTextChanged(); -	checker_ = new SpellChecker(); +	SpellCheckerFactory *checkerFactory = new SpellCheckerFactory(); +	checker_ = checkerFactory->createSpellChecker(); +	delete checkerFactory;  };  QtTextEdit::~QtTextEdit() {  | 
 Swift