From 61ca411b90b610b2e5438ec3b5b86a7e03939120 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/katapult@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../plugins/catalogs/amarokcatalog/amarokcatalog.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'katapult/plugins/catalogs/amarokcatalog') 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)); -- cgit v1.2.1