summaryrefslogtreecommitdiffstats
path: root/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp')
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp b/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
index a4cbd91..7ca1f9b 100644
--- a/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
+++ b/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
@@ -87,7 +87,7 @@ void AmarokCatalog::queryChanged()
"WHERE 1=1 "
);// AND
- queryList = TQStringList::split ( TQString(" "), TQString(queryString).tqreplace(TQChar(':')," ").tqreplace(TQChar('\''), " ").tqreplace(TQChar('\''), "%") );
+ queryList = TQStringList::split ( TQString(" "), TQString(queryString).replace(TQChar(':')," ").replace(TQChar('\''), " ").replace(TQChar('\''), "%") );
for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
sqlQuery.append(TQString(" AND (t.title LIKE '\%%1\%'").tqarg(*it));
sqlQuery.append(TQString(" OR a.name LIKE '\%%1\%')").tqarg(*it));
@@ -124,7 +124,7 @@ void AmarokCatalog::queryChanged()
}
//counts the matched charecters
- int i = queryString.tqfind( ':' );
+ int i = queryString.find( ':' );
if ( i != -1 ) {
if ( queryString[i+1] != ' ' )
queryString.insert(i+1, ' ');
@@ -134,8 +134,8 @@ void AmarokCatalog::queryChanged()
queryList = TQStringList::split ( " ", queryString );
unsigned int matched = 0;
for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
- if(matched < (_result.text().tqfind(*it, matched, false) + (*it).length()))
- matched = _result.text().tqfind(*it, matched, false) + (*it).length();
+ if(matched < (_result.text().find(*it, matched, false) + (*it).length()))
+ matched = _result.text().find(*it, matched, false) + (*it).length();
}
setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched));
@@ -157,7 +157,7 @@ void AmarokCatalog::queryChanged()
TQStringList queryList;
//prepares SQL-queryTQRegExp
TQString sqlQuery("SELECT a.name, t.title, t.deviceid, d.lastmountpoint, t.url, i.path, album.name FROM tags t LEFT JOIN statistics s ON (t.url = s.url AND t.deviceid = s.deviceid) LEFT JOIN artist a ON (t.artist = a.id) LEFT JOIN album ON (t.album = album.id) LEFT JOIN images i ON ( a.name = i.artist AND album.name = i.album) LEFT JOIN devices d ON (t.deviceid = d.id) WHERE ");
- queryList = TQStringList::split ( TQString(" "), TQString(queryString).tqreplace(TQChar(':')," ").tqreplace(TQChar('\''), " ").tqreplace(TQChar('\''), "%") );
+ queryList = TQStringList::split ( TQString(" "), TQString(queryString).replace(TQChar(':')," ").replace(TQChar('\''), " ").replace(TQChar('\''), "%") );
// Let's build each of these clauses
TQStringList clauses;
@@ -214,7 +214,7 @@ void AmarokCatalog::queryChanged()
}
//counts the matched charecters
- int i = queryString.tqfind( ':' );
+ int i = queryString.find( ':' );
if ( i != -1 ) {
if ( queryString[i+1] != ' ' )
queryString.insert(i+1, ' ');
@@ -224,8 +224,8 @@ void AmarokCatalog::queryChanged()
queryList = TQStringList::split ( " ", queryString );
unsigned int matched = 0;
for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
- if(matched < (_result.text().tqfind(*it, matched, false) + (*it).length()))
- matched = _result.text().tqfind(*it, matched, false) + (*it).length();
+ if(matched < (_result.text().find(*it, matched, false) + (*it).length()))
+ matched = _result.text().find(*it, matched, false) + (*it).length();
}
setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched));