diff options
Diffstat (limited to 'katapult/common/cachedcatalog.cpp')
-rw-r--r-- | katapult/common/cachedcatalog.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/katapult/common/cachedcatalog.cpp b/katapult/common/cachedcatalog.cpp index bf34b87..19c15a9 100644 --- a/katapult/common/cachedcatalog.cpp +++ b/katapult/common/cachedcatalog.cpp @@ -20,8 +20,8 @@ #include "cachedcatalog.moc" -#include <qstringlist.h> -#include <qstring.h> +#include <tqstringlist.h> +#include <tqstring.h> #include "cachedcatalog.h" #include "katapultitem.h" @@ -46,7 +46,7 @@ unsigned int CachedCatalog::minQueryLen() const void CachedCatalog::queryChanged() { - int newStatus = 0; + int newtqStatus = 0; if(query() == "") { results.clear(); @@ -58,7 +58,7 @@ void CachedCatalog::queryChanged() if(status() & S_Active) { - QPtrListIterator<KatapultItem> it(results); + TQPtrListIterator<KatapultItem> it(results); KatapultItem *item; while((item = it.current())!=0) @@ -73,7 +73,7 @@ void CachedCatalog::queryChanged() } else { results.clear(); - QPtrListIterator<KatapultItem> it(cache); + TQPtrListIterator<KatapultItem> it(cache); KatapultItem *item; while((item=it.current())!=0) { @@ -87,36 +87,36 @@ void CachedCatalog::queryChanged() } } - newStatus |= S_Active; + newtqStatus |= S_Active; if(results.count() > 0) { - newStatus |= S_HasResults; + newtqStatus |= S_HasResults; if(results.count() > 1) - newStatus |= S_Multiple; + newtqStatus |= S_Multiple; } else - newStatus |= S_NoResults; + newtqStatus |= S_NoResults; setBestMatch(newBestMatch); } } - setStatus(newStatus); + settqStatus(newtqStatus); } -Match CachedCatalog::queryItem(const KatapultItem *item, QString query) const +Match CachedCatalog::queryItem(const KatapultItem *item, TQString query) const { int wordNo = 0; int _rank = 0; unsigned int _matched = 0; - QString text = item->text().lower(); - QStringList queryWords = QStringList::split(" ", query.lower()); + TQString text = item->text().lower(); + TQStringList queryWords = TQStringList::split(" ", query.lower()); int wordMax = queryWords.count()-1; - QStringList words = QStringList::split(" ", text); - QStringList::Iterator wit = words.begin(); - for(QStringList::Iterator qit = queryWords.begin(); qit != queryWords.end(); ++qit) { - QString queryWord = *qit; + TQStringList words = TQStringList::split(" ", text); + TQStringList::Iterator wit = words.begin(); + for(TQStringList::Iterator qit = queryWords.begin(); qit != queryWords.end(); ++qit) { + TQString queryWord = *qit; bool didMatch = FALSE; for(; wit != words.end(); ++wit) { - QString word = *wit; + TQString word = *wit; if(word.startsWith(queryWord)) { if(_matched != 0) _matched++; @@ -151,11 +151,11 @@ Match CachedCatalog::queryItem(const KatapultItem *item, QString query) const return Match(item, _rank, _matched); } -const KatapultItem * CachedCatalog::findExact(QString text) const +const KatapultItem * CachedCatalog::findExact(TQString text) const { text = text.lower(); KatapultItem *item; - QPtrListIterator<KatapultItem> it(cache); + TQPtrListIterator<KatapultItem> it(cache); while((item=it.current())!=0) { ++it; |