summaryrefslogtreecommitdiffstats
path: root/kbabel/kbabeldict/searchengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/kbabeldict/searchengine.cpp')
-rw-r--r--kbabel/kbabeldict/searchengine.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kbabel/kbabeldict/searchengine.cpp b/kbabel/kbabeldict/searchengine.cpp
index 95ab5694..19112fe7 100644
--- a/kbabel/kbabeldict/searchengine.cpp
+++ b/kbabel/kbabeldict/searchengine.cpp
@@ -53,7 +53,7 @@ SearchResult::SearchResult(const SearchResult& r)
descriptions.setAutoDelete(true);
score=r.score;
- QPtrListIterator<TranslationInfo> it(r.descriptions);
+ TQPtrListIterator<TranslationInfo> it(r.descriptions);
for ( ; it.current(); ++it )
{
TranslationInfo *ti=new TranslationInfo(*(*it));
@@ -62,8 +62,8 @@ SearchResult::SearchResult(const SearchResult& r)
}
-PrefWidget::PrefWidget(QWidget *parent, const char *name)
- : QWidget(parent,name)
+PrefWidget::PrefWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
}
@@ -72,8 +72,8 @@ PrefWidget::~PrefWidget()
}
-SearchEngine::SearchEngine(QObject *parent, const char *name)
- : QObject(parent, name)
+SearchEngine::SearchEngine(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
autoUpdate=false;
results.setAutoDelete(true);
@@ -83,7 +83,7 @@ SearchEngine::~SearchEngine()
{
}
-bool SearchEngine::startSearchInTranslation(const QString&, unsigned int, const SearchFilter*)
+bool SearchEngine::startSearchInTranslation(const TQString&, unsigned int, const SearchFilter*)
{
return true;
}
@@ -175,34 +175,34 @@ void SearchEngine::clearResults()
-void SearchEngine::setEditedFile(const QString&)
+void SearchEngine::setEditedFile(const TQString&)
{
}
-void SearchEngine::setEditedPackage(const QString&)
+void SearchEngine::setEditedPackage(const TQString&)
{
}
-void SearchEngine::setLanguageCode(const QString&)
+void SearchEngine::setLanguageCode(const TQString&)
{
}
-void SearchEngine::setLanguage(const QString&,const QString&)
+void SearchEngine::setLanguage(const TQString&,const TQString&)
{
}
-void SearchEngine::stringChanged(const QStringList&,const QString&,unsigned int, const QString&)
+void SearchEngine::stringChanged(const TQStringList&,const TQString&,unsigned int, const TQString&)
{
}
-QString SearchEngine::directory(const QString& path, int n)
+TQString SearchEngine::directory(const TQString& path, int n)
{
if(n<0)
- return QString::null;
+ return TQString::null;
int begin=path.findRev('/');
int end=path.length();
@@ -213,14 +213,14 @@ QString SearchEngine::directory(const QString& path, int n)
if(n==0)
return path;
else
- return QString::null;
+ return TQString::null;
}
for(int i=0; i < n; i++)
{
if(begin==0)
{
- return QString::null;
+ return TQString::null;
}
end = begin;
@@ -228,7 +228,7 @@ QString SearchEngine::directory(const QString& path, int n)
if(begin < 0)
{
- return QString::null;
+ return TQString::null;
}
}
@@ -237,7 +237,7 @@ QString SearchEngine::directory(const QString& path, int n)
}
-uint SearchEngine::score(const QString& orig, const QString& found)
+uint SearchEngine::score(const TQString& orig, const TQString& found)
{
if(orig == found)
return 100;
@@ -246,8 +246,8 @@ uint SearchEngine::score(const QString& orig, const QString& found)
uint scoreB = ngramMatch(orig,found);
uint score = QMIN(scoreA, scoreB);
- QString f = found.lower();
- QString o = orig.lower();
+ TQString f = found.lower();
+ TQString o = orig.lower();
scoreA = ngramMatch(f, o);
scoreB = ngramMatch(o, f);
@@ -256,7 +256,7 @@ uint SearchEngine::score(const QString& orig, const QString& found)
return score;
}
-uint SearchEngine::ngramMatch (const QString& text1, const QString& text2,
+uint SearchEngine::ngramMatch (const TQString& text1, const TQString& text2,
uint ngram_len)
{
if (text1.length() < ngram_len || text2.length() < ngram_len)