diff options
Diffstat (limited to 'kbabel/kbabeldict/searchengine.cpp')
-rw-r--r-- | kbabel/kbabeldict/searchengine.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kbabel/kbabeldict/searchengine.cpp b/kbabel/kbabeldict/searchengine.cpp index 19112fe7..ac45c8b3 100644 --- a/kbabel/kbabeldict/searchengine.cpp +++ b/kbabel/kbabeldict/searchengine.cpp @@ -20,11 +20,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -62,8 +62,8 @@ SearchResult::SearchResult(const SearchResult& r) } -PrefWidget::PrefWidget(TQWidget *parent, const char *name) - : TQWidget(parent,name) +PrefWidget::PrefWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent,name) { } @@ -72,8 +72,8 @@ PrefWidget::~PrefWidget() } -SearchEngine::SearchEngine(TQObject *parent, const char *name) - : TQObject(parent, name) +SearchEngine::SearchEngine(TQObject *tqparent, const char *name) + : TQObject(tqparent, name) { autoUpdate=false; results.setAutoDelete(true); @@ -202,9 +202,9 @@ void SearchEngine::stringChanged(const TQStringList&,const TQString&,unsigned in TQString SearchEngine::directory(const TQString& path, int n) { if(n<0) - return TQString::null; + return TQString(); - int begin=path.findRev('/'); + int begin=path.tqfindRev('/'); int end=path.length(); if(begin < 0) @@ -213,22 +213,22 @@ TQString SearchEngine::directory(const TQString& path, int n) if(n==0) return path; else - return TQString::null; + return TQString(); } for(int i=0; i < n; i++) { if(begin==0) { - return TQString::null; + return TQString(); } end = begin; - begin = path.findRev('/', end-1); + begin = path.tqfindRev('/', end-1); if(begin < 0) { - return TQString::null; + return TQString(); } } @@ -244,14 +244,14 @@ uint SearchEngine::score(const TQString& orig, const TQString& found) uint scoreA = ngramMatch(found, orig); uint scoreB = ngramMatch(orig,found); - uint score = QMIN(scoreA, scoreB); + uint score = TQMIN(scoreA, scoreB); TQString f = found.lower(); TQString o = orig.lower(); scoreA = ngramMatch(f, o); scoreB = ngramMatch(o, f); - score = (QMIN(scoreA, scoreB)+score)/2; + score = (TQMIN(scoreA, scoreB)+score)/2; return score; } @@ -266,7 +266,7 @@ uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2, uint ngram_cnt = text1.length() - ngram_len + 1; for (uint i = 0; i < ngram_cnt; i++) { - if (text2.find(text1.mid(i,ngram_len)) >= 0) + if (text2.tqfind(text1.mid(i,ngram_len)) >= 0) cnt++; } |