diff options
Diffstat (limited to 'kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp')
-rw-r--r-- | kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp index bc79f082..6e664316 100644 --- a/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp +++ b/kbabel/kbabeldict/modules/pocompendium/pocompendium.cpp @@ -232,7 +232,7 @@ bool PoCompendium::searchCaseInsensitive(const TQString& text, uint pluralForm, TQValueList<int>::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { - if(foundIndices.tqcontains(*it)) + if(foundIndices.contains(*it)) { continue; } @@ -288,7 +288,7 @@ bool PoCompendium::searchTextOnly(const TQString& text, uint pluralForm, TQPtrLi TQValueList<int>::ConstIterator it; for( it = indexList->begin(); it != indexList->end(); ++it ) { - if(foundIndices.tqcontains(*it)) + if(foundIndices.contains(*it)) { continue; } @@ -346,12 +346,12 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr if(stop) break; - if(foundIndices.tqcontains(*it)) + if(foundIndices.contains(*it)) { continue; } - if(checkedIndices.tqcontains(*it)) + if(checkedIndices.contains(*it)) { continue; } @@ -397,7 +397,7 @@ bool PoCompendium::searchWords(const TQString& searchStr, uint pluralForm, TQPtr s=" "+*wit+" "; o=" "+origStr+" "; } - if(o.tqcontains(s)) + if(o.contains(s)) { found=true; } @@ -519,7 +519,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr emit progress( 50+(50*(checkCounter+1))/catalogInfo.total); } - if(checkedIndices.tqcontains(i)) + if(checkedIndices.contains(i)) { continue; } @@ -532,7 +532,7 @@ bool PoCompendium::searchNGram(const TQString& searchStr, uint pluralForm, TQPtr continue; } - if(foundIndices.tqcontains(i)) + if(foundIndices.contains(i)) { continue; } @@ -689,7 +689,7 @@ bool PoCompendium::startSearch(const TQString& text, uint pluralForm, const Sear // search without whitespace searchTextOnly(searchStr, pluralForm, results, foundIndices, checkedIndices); - // now, search based on words (tqcontains, is contained, etc) + // now, search based on words (contains, is contained, etc) searchWords(searchStr, pluralForm, results, foundIndices, checkedIndices); @@ -797,9 +797,9 @@ void PoCompendium::slotLoadCompendium() TQString path=url; - if(path.tqcontains("@LANG@")) + if(path.contains("@LANG@")) { - path.tqreplace("@LANG@",langCode); + path.replace("@LANG@",langCode); } KURL u=KCmdLineArgs::makeURL(path.local8Bit()); realURL = u.url(); @@ -866,19 +866,19 @@ void PoCompendium::recheckData() TQString PoCompendium::maskString(TQString s) { - s.tqreplace("\\","\\\\"); - s.tqreplace("\?","\\?"); - s.tqreplace("[","\\["); - s.tqreplace(".","\\."); - s.tqreplace("*","\\*"); - s.tqreplace("+","\\+"); - s.tqreplace("^","\\^"); - s.tqreplace("$","\\$"); - s.tqreplace("(","\\("); - s.tqreplace(")","\\)"); - s.tqreplace("{","\\{"); - s.tqreplace("}","\\}"); - s.tqreplace("|","\\|"); + s.replace("\\","\\\\"); + s.replace("\?","\\?"); + s.replace("[","\\["); + s.replace(".","\\."); + s.replace("*","\\*"); + s.replace("+","\\+"); + s.replace("^","\\^"); + s.replace("$","\\$"); + s.replace("(","\\("); + s.replace(")","\\)"); + s.replace("{","\\{"); + s.replace("}","\\}"); + s.replace("|","\\|"); return s; } @@ -917,7 +917,7 @@ void PoCompendium::addResult(SearchResult *result, TQPtrList<SearchResult>& res) void PoCompendium::setLanguageCode(const TQString& lang) { - if(initialized && url.tqcontains("@LANG@") && lang!=langCode + if(initialized && url.contains("@LANG@") && lang!=langCode && !loadTimer->isActive() ) { initialized=false; @@ -1120,7 +1120,7 @@ TQString PoCompendium::searchTranslation(const TQString& text, int &sc, const ui return res.first()->translation; } - // now, search based on words (tqcontains, is contained, etc) + // now, search based on words (contains, is contained, etc) searchWords(searchStr, pluralForm, res, foundIndices, checkedIndices); if( matchNGram || @@ -1181,7 +1181,7 @@ void PoCompendium::unregisterData() void PoCompendium::registerData() { - data = compendiumDict()->tqfind(realURL); + data = compendiumDict()->find(realURL); if(!data) { data = new CompendiumData; |