From 61ca411b90b610b2e5438ec3b5b86a7e03939120 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: [PATCH] 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 --- katapult/katapult/katapultsettings.cpp | 8 ++++---- .../catalogs/amarokcatalog/amarokcatalog.cpp | 16 ++++++++-------- .../catalogs/bookmarkcatalog/bookmarkcatalog.cpp | 2 +- .../calculatorcatalog/actionevalexpr.cpp | 6 +++--- .../calculatorcatalog/calculatorcatalog.cpp | 2 +- .../catalogs/calculatorcatalog/expression.cpp | 2 +- .../catalogs/documentcatalog/documentcatalog.cpp | 2 +- .../plugins/display/glassdisplay/qembed_images.h | 2 +- .../plugins/display/o2display/qembed_images.h | 2 +- .../plugins/display/puredisplay/qembed_images.h | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/katapult/katapult/katapultsettings.cpp b/katapult/katapult/katapultsettings.cpp index aaa4172..e0a4dc5 100644 --- a/katapult/katapult/katapultsettings.cpp +++ b/katapult/katapult/katapultsettings.cpp @@ -232,7 +232,7 @@ TQStringList KatapultSettings::displayIds() const int KatapultSettings::displayNumber() const { - return _displayIds.tqfindIndex(_displayName); + return _displayIds.findIndex(_displayName); } KatapultDisplay * KatapultSettings::display() const @@ -267,7 +267,7 @@ TQStringList KatapultSettings::inactiveCatalogNames() const TQStringList inactiveCatalogs, catalogs = _catalogIds; for(TQStringList::Iterator it = catalogs.begin(); it != catalogs.end(); ++it) { - if(!_activeCatalogNames.tqcontains(*it)) + if(!_activeCatalogNames.contains(*it)) inactiveCatalogs.append(*it); } return inactiveCatalogs; @@ -316,7 +316,7 @@ void KatapultSettings::loadCatalogPlugins() _catalogNames.append(service->name()); _catalogIds.append(id); - if(_activeCatalogNames.tqcontains(id)) + if(_activeCatalogNames.contains(id)) { int errCode = 0; catalog = KParts::ComponentFactory::createInstanceFromService @@ -371,7 +371,7 @@ void KatapultSettings::loadDisplayPlugins() KatapultCatalog * KatapultSettings::catalog(TQString catalogName) const { - return _activeCatalogs.tqfind(catalogName); + return _activeCatalogs.find(catalogName); } #include "katapultsettings.moc" 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)); diff --git a/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp b/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp index 0fae37d..6a0267e 100644 --- a/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp +++ b/katapult/plugins/catalogs/bookmarkcatalog/bookmarkcatalog.cpp @@ -111,7 +111,7 @@ TQString BookmarkCatalog::detectMozillaFile() TQString testDir = *it; if(home.exists(testDir)) { TQDir mozDir = TQDir(home.path()+"/"+testDir).canonicalPath(); - if(mozDir.dirName() != testDir && testDirs.tqcontains(mozDir.dirName())) + if(mozDir.dirName() != testDir && testDirs.contains(mozDir.dirName())) continue; TQString path = searchMozDir(mozDir.path()); if(!path.isEmpty()) diff --git a/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp b/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp index ff47f92..fdbbc60 100644 --- a/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp +++ b/katapult/plugins/catalogs/calculatorcatalog/actionevalexpr.cpp @@ -72,7 +72,7 @@ static TQString formatNumber(const TQString &numStr) if (expString.length()==1) expString=TQString(); // Replace dot with locale decimal separator - mantString.tqreplace(TQChar('.'), KGlobal::locale()->decimalSymbol()); + mantString.replace(TQChar('.'), KGlobal::locale()->decimalSymbol()); // Insert the thousand separators _insertSeparator(mantString, KGlobal::locale()->thousandsSeparator(), KGlobal::locale()->decimalSymbol()); @@ -152,8 +152,8 @@ void ActionEvaluateExpression::execute(const KatapultItem* item) const if (!_expr->parseError()) { TQClipboard *cb = TQApplication::tqclipboard(); TQString s = _expr->catalog()->formatString(); - s.tqreplace("%1", _expr->text()); - s.tqreplace("%2", text()); + s.replace("%1", _expr->text()); + s.replace("%2", text()); cb->setText(s, TQClipboard::Clipboard); cb->setText(s, TQClipboard::Selection); } diff --git a/katapult/plugins/catalogs/calculatorcatalog/calculatorcatalog.cpp b/katapult/plugins/catalogs/calculatorcatalog/calculatorcatalog.cpp index 12891d0..05a6c74 100644 --- a/katapult/plugins/catalogs/calculatorcatalog/calculatorcatalog.cpp +++ b/katapult/plugins/catalogs/calculatorcatalog/calculatorcatalog.cpp @@ -225,7 +225,7 @@ bool CalculatorCatalog::accepts(const TQString& str) const int CalculatorCatalog::getVarID(const char* name) { - VarNameToIdMap::iterator it = varNameToId.tqfind(TQString(name)); + VarNameToIdMap::iterator it = varNameToId.find(TQString(name)); if (it == varNameToId.end()) { _pendingVarName = TQString(name); return -1; diff --git a/katapult/plugins/catalogs/calculatorcatalog/expression.cpp b/katapult/plugins/catalogs/calculatorcatalog/expression.cpp index dfa4543..4f6fdcc 100644 --- a/katapult/plugins/catalogs/calculatorcatalog/expression.cpp +++ b/katapult/plugins/catalogs/calculatorcatalog/expression.cpp @@ -74,7 +74,7 @@ void Expression::evaluate(bool assignments) const if (!_text.isEmpty()) { TQString t = _text; CalculatorCatalog::ParserControl cntrl; - cntrl.expression = t.tqreplace(',', '.').ascii(); + cntrl.expression = t.replace(',', '.').ascii(); cntrl.catalog = _catalog; cntrl.assignments = assignments; if (yyparse(&cntrl) == 0) { diff --git a/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp b/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp index 38acba3..faa129c 100644 --- a/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp +++ b/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp @@ -112,7 +112,7 @@ void DocumentCatalog::queryChanged() TQString path = query().lower().remove(0, queryMatched); int index; - while((index = path.tqfind('/')) != -1) { + while((index = path.find('/')) != -1) { TQString folderQuery = path.left(index); TQString guess = TQString(); diff --git a/katapult/plugins/display/glassdisplay/qembed_images.h b/katapult/plugins/display/glassdisplay/qembed_images.h index 5a97c32..2406950 100644 --- a/katapult/plugins/display/glassdisplay/qembed_images.h +++ b/katapult/plugins/display/glassdisplay/qembed_images.h @@ -7991,7 +7991,7 @@ static struct EmbedImage { static const TQImage& qembed_findImage( const TQString& name ) { static TQDict dict; - TQImage* img = dict.tqfind( name ); + TQImage* img = dict.find( name ); if ( !img ) { for ( int i = 0; embed_image_vec[i].data; i++ ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { diff --git a/katapult/plugins/display/o2display/qembed_images.h b/katapult/plugins/display/o2display/qembed_images.h index db3b3cf..1cce608 100644 --- a/katapult/plugins/display/o2display/qembed_images.h +++ b/katapult/plugins/display/o2display/qembed_images.h @@ -9768,7 +9768,7 @@ static struct EmbedImage { static const TQImage& qembed_findImage( const TQString& name ) { static TQDict dict; - TQImage* img = dict.tqfind( name ); + TQImage* img = dict.find( name ); if ( !img ) { for ( int i = 0; embed_image_vec[i].data; i++ ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { diff --git a/katapult/plugins/display/puredisplay/qembed_images.h b/katapult/plugins/display/puredisplay/qembed_images.h index 79c8b67..1b09e02 100644 --- a/katapult/plugins/display/puredisplay/qembed_images.h +++ b/katapult/plugins/display/puredisplay/qembed_images.h @@ -9768,7 +9768,7 @@ static struct EmbedImage { static const TQImage& qembed_findImage( const TQString& name ) { static TQDict dict; - TQImage* img = dict.tqfind( name ); + TQImage* img = dict.find( name ); if ( !img ) { for ( int i = 0; embed_image_vec[i].data; i++ ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {