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
v3.5.13-sru
tpearson 13 years ago
parent 9e5a161735
commit 61ca411b90

@ -232,7 +232,7 @@ TQStringList KatapultSettings::displayIds() const
int KatapultSettings::displayNumber() const int KatapultSettings::displayNumber() const
{ {
return _displayIds.tqfindIndex(_displayName); return _displayIds.findIndex(_displayName);
} }
KatapultDisplay * KatapultSettings::display() const KatapultDisplay * KatapultSettings::display() const
@ -267,7 +267,7 @@ TQStringList KatapultSettings::inactiveCatalogNames() const
TQStringList inactiveCatalogs, catalogs = _catalogIds; TQStringList inactiveCatalogs, catalogs = _catalogIds;
for(TQStringList::Iterator it = catalogs.begin(); it != catalogs.end(); ++it) for(TQStringList::Iterator it = catalogs.begin(); it != catalogs.end(); ++it)
{ {
if(!_activeCatalogNames.tqcontains(*it)) if(!_activeCatalogNames.contains(*it))
inactiveCatalogs.append(*it); inactiveCatalogs.append(*it);
} }
return inactiveCatalogs; return inactiveCatalogs;
@ -316,7 +316,7 @@ void KatapultSettings::loadCatalogPlugins()
_catalogNames.append(service->name()); _catalogNames.append(service->name());
_catalogIds.append(id); _catalogIds.append(id);
if(_activeCatalogNames.tqcontains(id)) if(_activeCatalogNames.contains(id))
{ {
int errCode = 0; int errCode = 0;
catalog = KParts::ComponentFactory::createInstanceFromService<KatapultCatalog> catalog = KParts::ComponentFactory::createInstanceFromService<KatapultCatalog>
@ -371,7 +371,7 @@ void KatapultSettings::loadDisplayPlugins()
KatapultCatalog * KatapultSettings::catalog(TQString catalogName) const KatapultCatalog * KatapultSettings::catalog(TQString catalogName) const
{ {
return _activeCatalogs.tqfind(catalogName); return _activeCatalogs.find(catalogName);
} }
#include "katapultsettings.moc" #include "katapultsettings.moc"

@ -87,7 +87,7 @@ void AmarokCatalog::queryChanged()
"WHERE 1=1 " "WHERE 1=1 "
);// AND );// 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) { for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
sqlQuery.append(TQString(" AND (t.title LIKE '\%%1\%'").tqarg(*it)); sqlQuery.append(TQString(" AND (t.title LIKE '\%%1\%'").tqarg(*it));
sqlQuery.append(TQString(" OR a.name 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 //counts the matched charecters
int i = queryString.tqfind( ':' ); int i = queryString.find( ':' );
if ( i != -1 ) { if ( i != -1 ) {
if ( queryString[i+1] != ' ' ) if ( queryString[i+1] != ' ' )
queryString.insert(i+1, ' '); queryString.insert(i+1, ' ');
@ -134,8 +134,8 @@ void AmarokCatalog::queryChanged()
queryList = TQStringList::split ( " ", queryString ); queryList = TQStringList::split ( " ", queryString );
unsigned int matched = 0; unsigned int matched = 0;
for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) { for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
if(matched < (_result.text().tqfind(*it, matched, false) + (*it).length())) if(matched < (_result.text().find(*it, matched, false) + (*it).length()))
matched = _result.text().tqfind(*it, matched, false) + (*it).length(); matched = _result.text().find(*it, matched, false) + (*it).length();
} }
setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched)); setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched));
@ -157,7 +157,7 @@ void AmarokCatalog::queryChanged()
TQStringList queryList; TQStringList queryList;
//prepares SQL-queryTQRegExp //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 "); 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 // Let's build each of these clauses
TQStringList clauses; TQStringList clauses;
@ -214,7 +214,7 @@ void AmarokCatalog::queryChanged()
} }
//counts the matched charecters //counts the matched charecters
int i = queryString.tqfind( ':' ); int i = queryString.find( ':' );
if ( i != -1 ) { if ( i != -1 ) {
if ( queryString[i+1] != ' ' ) if ( queryString[i+1] != ' ' )
queryString.insert(i+1, ' '); queryString.insert(i+1, ' ');
@ -224,8 +224,8 @@ void AmarokCatalog::queryChanged()
queryList = TQStringList::split ( " ", queryString ); queryList = TQStringList::split ( " ", queryString );
unsigned int matched = 0; unsigned int matched = 0;
for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) { for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
if(matched < (_result.text().tqfind(*it, matched, false) + (*it).length())) if(matched < (_result.text().find(*it, matched, false) + (*it).length()))
matched = _result.text().tqfind(*it, matched, false) + (*it).length(); matched = _result.text().find(*it, matched, false) + (*it).length();
} }
setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched)); setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched));

@ -111,7 +111,7 @@ TQString BookmarkCatalog::detectMozillaFile()
TQString testDir = *it; TQString testDir = *it;
if(home.exists(testDir)) { if(home.exists(testDir)) {
TQDir mozDir = TQDir(home.path()+"/"+testDir).canonicalPath(); TQDir mozDir = TQDir(home.path()+"/"+testDir).canonicalPath();
if(mozDir.dirName() != testDir && testDirs.tqcontains(mozDir.dirName())) if(mozDir.dirName() != testDir && testDirs.contains(mozDir.dirName()))
continue; continue;
TQString path = searchMozDir(mozDir.path()); TQString path = searchMozDir(mozDir.path());
if(!path.isEmpty()) if(!path.isEmpty())

@ -72,7 +72,7 @@ static TQString formatNumber(const TQString &numStr)
if (expString.length()==1) expString=TQString(); if (expString.length()==1) expString=TQString();
// Replace dot with locale decimal separator // Replace dot with locale decimal separator
mantString.tqreplace(TQChar('.'), KGlobal::locale()->decimalSymbol()); mantString.replace(TQChar('.'), KGlobal::locale()->decimalSymbol());
// Insert the thousand separators // Insert the thousand separators
_insertSeparator(mantString, KGlobal::locale()->thousandsSeparator(), KGlobal::locale()->decimalSymbol()); _insertSeparator(mantString, KGlobal::locale()->thousandsSeparator(), KGlobal::locale()->decimalSymbol());
@ -152,8 +152,8 @@ void ActionEvaluateExpression::execute(const KatapultItem* item) const
if (!_expr->parseError()) { if (!_expr->parseError()) {
TQClipboard *cb = TQApplication::tqclipboard(); TQClipboard *cb = TQApplication::tqclipboard();
TQString s = _expr->catalog()->formatString(); TQString s = _expr->catalog()->formatString();
s.tqreplace("%1", _expr->text()); s.replace("%1", _expr->text());
s.tqreplace("%2", text()); s.replace("%2", text());
cb->setText(s, TQClipboard::Clipboard); cb->setText(s, TQClipboard::Clipboard);
cb->setText(s, TQClipboard::Selection); cb->setText(s, TQClipboard::Selection);
} }

@ -225,7 +225,7 @@ bool CalculatorCatalog::accepts(const TQString& str) const
int CalculatorCatalog::getVarID(const char* name) int CalculatorCatalog::getVarID(const char* name)
{ {
VarNameToIdMap::iterator it = varNameToId.tqfind(TQString(name)); VarNameToIdMap::iterator it = varNameToId.find(TQString(name));
if (it == varNameToId.end()) { if (it == varNameToId.end()) {
_pendingVarName = TQString(name); _pendingVarName = TQString(name);
return -1; return -1;

@ -74,7 +74,7 @@ void Expression::evaluate(bool assignments) const
if (!_text.isEmpty()) { if (!_text.isEmpty()) {
TQString t = _text; TQString t = _text;
CalculatorCatalog::ParserControl cntrl; CalculatorCatalog::ParserControl cntrl;
cntrl.expression = t.tqreplace(',', '.').ascii(); cntrl.expression = t.replace(',', '.').ascii();
cntrl.catalog = _catalog; cntrl.catalog = _catalog;
cntrl.assignments = assignments; cntrl.assignments = assignments;
if (yyparse(&cntrl) == 0) { if (yyparse(&cntrl) == 0) {

@ -112,7 +112,7 @@ void DocumentCatalog::queryChanged()
TQString path = query().lower().remove(0, queryMatched); TQString path = query().lower().remove(0, queryMatched);
int index; int index;
while((index = path.tqfind('/')) != -1) { while((index = path.find('/')) != -1) {
TQString folderQuery = path.left(index); TQString folderQuery = path.left(index);
TQString guess = TQString(); TQString guess = TQString();

@ -7991,7 +7991,7 @@ static struct EmbedImage {
static const TQImage& qembed_findImage( const TQString& name ) static const TQImage& qembed_findImage( const TQString& name )
{ {
static TQDict<TQImage> dict; static TQDict<TQImage> dict;
TQImage* img = dict.tqfind( name ); TQImage* img = dict.find( name );
if ( !img ) { if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) { for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {

@ -9768,7 +9768,7 @@ static struct EmbedImage {
static const TQImage& qembed_findImage( const TQString& name ) static const TQImage& qembed_findImage( const TQString& name )
{ {
static TQDict<TQImage> dict; static TQDict<TQImage> dict;
TQImage* img = dict.tqfind( name ); TQImage* img = dict.find( name );
if ( !img ) { if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) { for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {

@ -9768,7 +9768,7 @@ static struct EmbedImage {
static const TQImage& qembed_findImage( const TQString& name ) static const TQImage& qembed_findImage( const TQString& name )
{ {
static TQDict<TQImage> dict; static TQDict<TQImage> dict;
TQImage* img = dict.tqfind( name ); TQImage* img = dict.find( name );
if ( !img ) { if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) { for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {

Loading…
Cancel
Save