summaryrefslogtreecommitdiffstats
path: root/kmouth/wordcompletion/wordcompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmouth/wordcompletion/wordcompletion.cpp')
-rw-r--r--kmouth/wordcompletion/wordcompletion.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/kmouth/wordcompletion/wordcompletion.cpp b/kmouth/wordcompletion/wordcompletion.cpp
index a5d7a4e..5abd4b7 100644
--- a/kmouth/wordcompletion/wordcompletion.cpp
+++ b/kmouth/wordcompletion/wordcompletion.cpp
@@ -46,7 +46,7 @@ TQString WordCompletion::makeCompletion(const TQString &text) {
d->lastText = text;
KCompletion::clear();
- int border = text.tqfindRev(TQRegExp("\\W"));
+ int border = text.findRev(TQRegExp("\\W"));
TQString suffix = text.right (text.length() - border - 1).lower();
TQString prefix = text.left (border + 1);
@@ -84,7 +84,7 @@ TQStringList WordCompletion::wordLists(const TQString &language) {
}
TQString WordCompletion::languageOfWordList(const TQString &wordlist) {
- if (d->dictDetails.tqcontains(wordlist))
+ if (d->dictDetails.contains(wordlist))
return d->dictDetails[wordlist].language;
else
return TQString();
@@ -137,7 +137,7 @@ bool WordCompletion::setWordList(const TQString &wordlist) {
d->wordsToSave = false;
d->map.clear();
- bool result = d->dictDetails.tqcontains (wordlist);
+ bool result = d->dictDetails.contains (wordlist);
if (result)
d->current = wordlist;
else
@@ -177,13 +177,13 @@ void WordCompletion::addSentence (const TQString &sentence) {
TQStringList::ConstIterator it;
for (it = words.begin(); it != words.end(); ++it) {
- if (!(*it).tqcontains(TQRegExp("\\d|_"))) {
+ if (!(*it).contains(TQRegExp("\\d|_"))) {
TQString key = (*it).lower();
- if (d->map.tqcontains(key))
+ if (d->map.contains(key))
d->map[key] += 1;
else
d->map[key] = 1;
- if (d->addedWords.tqcontains(key))
+ if (d->addedWords.contains(key))
d->addedWords[key] += 1;
else
d->addedWords[key] = 1;
@@ -208,7 +208,7 @@ void WordCompletion::save () {
stream << "WPDictFile\n";
TQMap<TQString,int>::ConstIterator it;
for (it = d->map.begin(); it != d->map.end(); ++it) {
- if (d->addedWords.tqcontains(it.key())) {
+ if (d->addedWords.contains(it.key())) {
stream << it.key() << "\t" << d->addedWords[it.key()] << "\t1\n";
stream << it.key() << "\t" << it.data() - d->addedWords[it.key()] << "\t2\n";
}