diff options
Diffstat (limited to 'kbabel/kbabel/kbabelview.cpp')
-rw-r--r-- | kbabel/kbabel/kbabelview.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp index 1b8795e2..830d17ce 100644 --- a/kbabel/kbabel/kbabelview.cpp +++ b/kbabel/kbabel/kbabelview.cpp @@ -73,7 +73,7 @@ #include <kio/netaccess.h> #include <knotifyclient.h> #include <ktempfile.h> -#include <kspell.h> +#include <tdespell.h> #include <twin.h> #include <kstdaccel.h> #include <kurldrag.h> @@ -172,7 +172,7 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project spell.posDict.setAutoDelete(true); spell.active=false; - spell2.kspell = 0; + spell2.tdespell = 0; spell2.config = 0; setAcceptDrops(true); @@ -293,9 +293,9 @@ KBabelView::~KBabelView() delete _argExtractor; delete _tagExtractor; - if( spell2.kspell ) + if( spell2.tdespell ) { - spell2.kspell = 0; + spell2.tdespell = 0; delete spell2.config; spell2.config = 0; } @@ -389,7 +389,7 @@ of the currently displayed entry.</p></qt>")); if( pf < 1 ) pf = 1; - msgstrEdit = new HidingMsgEdit( pf,this,spell2.kspell,tempWidget,"msgstrEdit"); + msgstrEdit = new HidingMsgEdit( pf,this,spell2.tdespell,tempWidget,"msgstrEdit"); msgstrEdit->installEventFilter(this); KCursor::setAutoHideCursor(msgstrEdit,true); @@ -751,16 +751,16 @@ void KBabelView::readProject(Project::Ptr project) { // if there is a spellchecker already, free it - if( spell2.kspell ) + if( spell2.tdespell ) { // ensure the spellchecker is not used anymore msgstrEdit->setSpellChecker(0L); // free it - spell2.kspell->cleanUp(); + spell2.tdespell->cleanUp(); - delete spell2.kspell; - spell2.kspell = 0; + delete spell2.tdespell; + spell2.tdespell = 0; } spell2.config = new KSpellConfig(0L, "tempSpellConfig"); @@ -770,18 +770,18 @@ void KBabelView::readProject(Project::Ptr project) spell2.config->setEncoding(_spellcheckSettings.spellEncoding); spell2.config->setDictionary(_spellcheckSettings.spellDict); - spell2.kspell= new KSpell(this, "", TQT_TQOBJECT(this), TQT_SLOT(dummy(KSpell *)), + spell2.tdespell= new KSpell(this, "", TQT_TQOBJECT(this), TQT_SLOT(dummy(KSpell *)), spell2.config, false, false); - if(spell2.kspell->status() == KSpell::Error) + if(spell2.tdespell->status() == KSpell::Error) kdWarning(KBABEL) << "Something's wrong with KSpell, can't start on-the-fly checking" << endl; else { kdDebug() << "On the fly spellchecker: " - << spell2.kspell << endl; - msgstrEdit->setSpellChecker(spell2.kspell); + << spell2.tdespell << endl; + msgstrEdit->setSpellChecker(spell2.tdespell); } - // spell2.kspell->setAutoDelete(true); // let KSpell handle delete + // spell2.tdespell->setAutoDelete(true); // let KSpell handle delete //on-the-fly spellcheck end } else @@ -3942,31 +3942,31 @@ void KBabelView::spellcheck() spell.active=true; _dontBeep=true; - spell.kspell= new KSpell (this, i18n("Spellcheck"), + spell.tdespell= new KSpell (this, i18n("Spellcheck"), TQT_TQOBJECT(this), TQT_SLOT(spellStart(KSpell *)), spell.config, true, true); - if( spell.kspell->status() == KSpell::Error ) + if( spell.tdespell->status() == KSpell::Error ) { KMessageBox::error( this, i18n("KBabel cannot start spell checker. " "Please check your TDE installation.") ); return; } - connect(spell.kspell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone())); + connect(spell.tdespell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone())); - connect(spell.kspell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList & + connect(spell.tdespell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList & , unsigned int)), this , TQT_SLOT(spellMisspelled(const TQString &, const TQStringList &, unsigned int))); - connect(spell.kspell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int)) + connect(spell.tdespell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int)) , this, TQT_SLOT(spellCorrected(const TQString &, const TQString &, unsigned int))); - connect(spell.kspell,TQT_SIGNAL(ignoreall(const TQString &)) + connect(spell.tdespell,TQT_SIGNAL(ignoreall(const TQString &)) , this, TQT_SLOT(spellAddIgnore(const TQString &))); - connect(spell.kspell, TQT_SIGNAL(done(bool)) + connect(spell.tdespell, TQT_SIGNAL(done(bool)) , this, TQT_SLOT(spellResult(bool))); - spell.kspell->setAutoDelete(true); // let KSpell handle delete + spell.tdespell->setAutoDelete(true); // let KSpell handle delete } else { @@ -4034,14 +4034,14 @@ void KBabelView::spellStart(KSpell *) kapp->processEvents(100); } - spell.kspell->ignore(*it); + spell.tdespell->ignore(*it); } emit signalClearProgressBar(); } } - spell.kspell->checkList(&spell.wordList); + spell.tdespell->checkList(&spell.wordList); } @@ -4364,8 +4364,8 @@ void KBabelView::spellResult(bool flag) undo(); } - int s=spell.kspell->dlgResult(); - spell.kspell->cleanUp(); + int s=spell.tdespell->dlgResult(); + spell.tdespell->cleanUp(); emit signalSpellcheckDone(s); TQTimer::singleShot(0,this,TQT_SLOT(cleanUpSpellStruct())); @@ -4377,9 +4377,9 @@ void KBabelView::spellCleanDone() kdDebug(KBABEL) << "spellCleanDone" << endl; // if the pointer is cleared, you have finished correcly - if( !spell.kspell ) return; + if( !spell.tdespell ) return; - KSpell::spellStatus status = spell.kspell->status(); + KSpell::spellStatus status = spell.tdespell->status(); if(status == KSpell::Error || status == KSpell::Crashed) { @@ -4401,8 +4401,8 @@ void KBabelView::spellCleanDone() void KBabelView::cleanUpSpellStruct() { kdDebug(KBABEL) << "Cleaning structure" << endl; - // spell.kspell is set to be autodeleted - spell.kspell = 0; + // spell.tdespell is set to be autodeleted + spell.tdespell = 0; delete spell.config; spell.config=0; spell.wordList.clear(); |