diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch) | |
tree | 766a8ad7939fcf3eec534184c36bd0e0f80489e2 /kode | |
parent | 469cc56a805bd3d6940d54adbef554877c29853c (diff) | |
download | tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kode')
-rw-r--r-- | kode/automakefile.cpp | 8 | ||||
-rw-r--r-- | kode/class.cpp | 6 | ||||
-rw-r--r-- | kode/file.cpp | 2 | ||||
-rw-r--r-- | kode/kodemain.cpp | 20 | ||||
-rw-r--r-- | kode/kwsdl/compiler.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/converter.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/kung/loader.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/namemapper.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/parser.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/schema/parser.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/schema/qualifiedname.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/schema/simpletype.cpp | 2 | ||||
-rw-r--r-- | kode/kwsdl/typemapper.cpp | 18 | ||||
-rw-r--r-- | kode/kxml_compiler/creator.cpp | 4 | ||||
-rw-r--r-- | kode/kxml_compiler/kxml_compiler.cpp | 4 | ||||
-rw-r--r-- | kode/kxml_compiler/parser.cpp | 6 | ||||
-rw-r--r-- | kode/printer.cpp | 8 |
17 files changed, 46 insertions, 46 deletions
diff --git a/kode/automakefile.cpp b/kode/automakefile.cpp index 8d14540c5..468059ae3 100644 --- a/kode/automakefile.cpp +++ b/kode/automakefile.cpp @@ -35,7 +35,7 @@ AutoMakefile::AutoMakefile() void AutoMakefile::addTarget( const Target &t ) { mTargets.append( t ); - if ( mTargetTypes.tqfind( t.type() ) == mTargetTypes.end() ) { + if ( mTargetTypes.find( t.type() ) == mTargetTypes.end() ) { mTargetTypes.append( t.type() ); } } @@ -47,10 +47,10 @@ void AutoMakefile::addEntry( const TQString &variable, const TQString &value ) return; } - TQStringList::ConstIterator it = mEntries.tqfind( variable ); + TQStringList::ConstIterator it = mEntries.find( variable ); if ( it == mEntries.end() ) { mEntries.append( variable ); - TQMap<TQString,TQString>::Iterator it = mValues.tqfind( variable ); + TQMap<TQString,TQString>::Iterator it = mValues.find( variable ); if ( it == mValues.end() ) { mValues.insert( variable, value ); } else { @@ -98,7 +98,7 @@ TQString AutoMakefile::text() const if ( t.type() != targetType ) continue; TQString name = t.name(); - name.tqreplace( '.', '_' ); + name.replace( '.', '_' ); out += name + "_SOURCES = " + t.sources() + '\n'; if ( !t.libAdd().isEmpty() ) diff --git a/kode/class.cpp b/kode/class.cpp index ef26ff73d..dc443c20d 100644 --- a/kode/class.cpp +++ b/kode/class.cpp @@ -78,12 +78,12 @@ void Class::setNameSpace( const TQString &nameSpace ) void Class::addInclude( const TQString &include, const TQString &forwardDeclaration ) { - if ( mIncludes.tqfind( include ) == mIncludes.end() ) { + if ( mIncludes.find( include ) == mIncludes.end() ) { mIncludes.append( include ); } if( !forwardDeclaration.isEmpty() && - mForwardDeclarations.tqfind( forwardDeclaration ) == + mForwardDeclarations.find( forwardDeclaration ) == mForwardDeclarations.end() ) { mForwardDeclarations.append( forwardDeclaration ); } @@ -94,7 +94,7 @@ void Class::addHeaderInclude( const TQString &include ) if ( include.isEmpty() ) return; - if ( mHeaderIncludes.tqfind( include ) == mHeaderIncludes.end() ) { + if ( mHeaderIncludes.find( include ) == mHeaderIncludes.end() ) { mHeaderIncludes.append( include ); } } diff --git a/kode/file.cpp b/kode/file.cpp index b71109ec1..ce8d2a3e8 100644 --- a/kode/file.cpp +++ b/kode/file.cpp @@ -78,7 +78,7 @@ void File::addInclude( const TQString &i ) TQString include = i; if( !include.endsWith( ".h" ) ) include.append( ".h" ); - if ( mIncludes.tqfind( include ) == mIncludes.end() ) { + if ( mIncludes.find( include ) == mIncludes.end() ) { mIncludes.append( include ); } } diff --git a/kode/kodemain.cpp b/kode/kodemain.cpp index dcc073edc..63746effe 100644 --- a/kode/kodemain.cpp +++ b/kode/kodemain.cpp @@ -167,14 +167,14 @@ int addProperty( KCmdLineArgs *args ) // out += line + "\n"; switch( state ) { case FindClass: -// if ( line.tqfind( TQRegExp( className ) ) >= 0 ) { - if ( line.tqfind( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) { +// if ( line.find( TQRegExp( className ) ) >= 0 ) { + if ( line.find( TQRegExp( "^\\s*class\\s+" + className ) ) >= 0 ) { kdDebug() << " FOUND CLASS" << endl; state = FindConstructor; } break; case FindConstructor: - if ( line.tqfind( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) { + if ( line.find( TQRegExp( "^\\s*" + className + "\\s*\\(" ) ) >= 0 ) { kdDebug() << " FOUND CONSTRUCTOR" << endl; out += readAhead; readAhead = TQString(); @@ -212,9 +212,9 @@ int addProperty( KCmdLineArgs *args ) } } } - } else if ( line.tqfind( TQRegExp( "\\s*protected" ) ) >= 0 ) { + } else if ( line.find( TQRegExp( "\\s*protected" ) ) >= 0 ) { state = FindPrivate; - } else if ( line.tqfind( TQRegExp( "\\s*private" ) ) >= 0 ) { + } else if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) { if ( accessor.isEmpty() ) { addPropertyFunctions( out, type, name ); out += readAhead; @@ -235,7 +235,7 @@ int addProperty( KCmdLineArgs *args ) } break; case FindPrivate: - if ( line.tqfind( TQRegExp( "\\s*private" ) ) >= 0 ) { + if ( line.find( TQRegExp( "\\s*private" ) ) >= 0 ) { if ( accessor.isEmpty() ) { out += readAhead; readAhead = TQString(); @@ -248,7 +248,7 @@ int addProperty( KCmdLineArgs *args ) break; case FindVariables: { - if ( line.tqfind( "m" + accessor.lower(), 0, false ) >= 0 ) { + if ( line.find( "m" + accessor.lower(), 0, false ) >= 0 ) { out += readAhead; readAhead = TQString(); addPropertyVariable( out, type, name ); @@ -309,8 +309,8 @@ int codify( KCmdLineArgs *args ) TQTextStream ts( &f ); TQString line; while( !( line = ts.readLine() ).isNull() ) { - line.tqreplace( "\\", "\\\\" ); - line.tqreplace( "\"", "\\\"" ); + line.replace( "\\", "\\\\" ); + line.replace( "\"", "\\\"" ); line = "code += \"" + line; line.append( "\";" ); std::cout << line.local8Bit().data() << std::endl; @@ -374,7 +374,7 @@ int create( KCmdLineArgs *args ) KABC::Addressee::List as = KABC::StdAddressBook::self()->findByEmail( authorEmail ); if ( as.isEmpty() ) { - kdDebug() << "Unable to tqfind '" << authorEmail << "' in address book." + kdDebug() << "Unable to find '" << authorEmail << "' in address book." << endl; } else { a = as.first(); diff --git a/kode/kwsdl/compiler.cpp b/kode/kwsdl/compiler.cpp index 507e8bd52..e3ccf4f8c 100644 --- a/kode/kwsdl/compiler.cpp +++ b/kode/kwsdl/compiler.cpp @@ -39,7 +39,7 @@ Compiler::Compiler() void Compiler::setWSDLUrl( const TQString &wsdlUrl ) { mWSDLUrl = wsdlUrl; - mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.tqfindRev( '/' ) ); + mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.findRev( '/' ) ); mParser.setSchemaBaseUrl( mWSDLBaseUrl ); } diff --git a/kode/kwsdl/converter.cpp b/kode/kwsdl/converter.cpp index 173ca7fb3..f8d258013 100644 --- a/kode/kwsdl/converter.cpp +++ b/kode/kwsdl/converter.cpp @@ -32,7 +32,7 @@ static TQString escapeEnum( const TQString &str ) { TQString enumStr = capitalize( str ); - return enumStr.tqreplace( "-", "_" ); + return enumStr.replace( "-", "_" ); } Converter::Converter() diff --git a/kode/kwsdl/kung/loader.cpp b/kode/kwsdl/kung/loader.cpp index 41f965bc2..8b0281ac8 100644 --- a/kode/kwsdl/kung/loader.cpp +++ b/kode/kwsdl/kung/loader.cpp @@ -35,7 +35,7 @@ Loader::Loader() void Loader::setWSDLUrl( const TQString &wsdlUrl ) { mWSDLUrl = wsdlUrl; - mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.tqfindRev( '/' ) ); + mWSDLBaseUrl = mWSDLUrl.left( mWSDLUrl.findRev( '/' ) ); mParser.setSchemaBaseUrl( mWSDLBaseUrl ); } diff --git a/kode/kwsdl/namemapper.cpp b/kode/kwsdl/namemapper.cpp index 6d7ae6399..426498f5c 100644 --- a/kode/kwsdl/namemapper.cpp +++ b/kode/kwsdl/namemapper.cpp @@ -30,7 +30,7 @@ NameMapper::NameMapper() TQString NameMapper::escape( const TQString &name ) const { - if ( mKeyWords.tqcontains( name ) ) + if ( mKeyWords.contains( name ) ) return "_" + name; else return name; diff --git a/kode/kwsdl/parser.cpp b/kode/kwsdl/parser.cpp index b8512490b..6e2a37dc0 100644 --- a/kode/kwsdl/parser.cpp +++ b/kode/kwsdl/parser.cpp @@ -27,7 +27,7 @@ using namespace KWSDL; static TQString sns( const TQString &str ) { - int pos = str.tqfind( ':' ); + int pos = str.find( ':' ); if ( pos != -1 ) return str.mid( pos + 1 ); else diff --git a/kode/kwsdl/schema/parser.cpp b/kode/kwsdl/schema/parser.cpp index 4571f5cc6..148599751 100644 --- a/kode/kwsdl/schema/parser.cpp +++ b/kode/kwsdl/schema/parser.cpp @@ -200,7 +200,7 @@ void Parser::parseImport( const TQDomElement &element ) TQString location = element.attribute( "schemaLocation" ); if ( !location.isEmpty() ) { // don't import a schema twice - if ( mImportedSchemas.tqcontains( location ) ) + if ( mImportedSchemas.contains( location ) ) return; else mImportedSchemas.append( location ); diff --git a/kode/kwsdl/schema/qualifiedname.cpp b/kode/kwsdl/schema/qualifiedname.cpp index 41e6fd849..350bca32f 100644 --- a/kode/kwsdl/schema/qualifiedname.cpp +++ b/kode/kwsdl/schema/qualifiedname.cpp @@ -65,7 +65,7 @@ bool QualifiedName::operator==( const QualifiedName &qn ) const void QualifiedName::parse( const TQString &str ) { - int pos = str.tqfind( ':' ); + int pos = str.find( ':' ); if ( pos != -1 ) { mPrefix = str.left( pos ); mLocalName = str.mid( pos + 1 ); diff --git a/kode/kwsdl/schema/simpletype.cpp b/kode/kwsdl/schema/simpletype.cpp index 50242808f..d5dcf2fd9 100644 --- a/kode/kwsdl/schema/simpletype.cpp +++ b/kode/kwsdl/schema/simpletype.cpp @@ -202,7 +202,7 @@ void SimpleType::setFacetValue( const TQString &value ) mFacetValue.wsp = PRESERVE; else if ( value == "collapse" ) mFacetValue.wsp = COLLAPSE; - else if ( value == "tqreplace" ) + else if ( value == "replace" ) mFacetValue.wsp = REPLACE; else { qDebug( "Invalid facet value for whitespace" ); diff --git a/kode/kwsdl/typemapper.cpp b/kode/kwsdl/typemapper.cpp index 024b4f42d..3ec0a20a3 100644 --- a/kode/kwsdl/typemapper.cpp +++ b/kode/kwsdl/typemapper.cpp @@ -71,7 +71,7 @@ TQString TypeMapper::type( const Schema::Element *element ) const TQString type; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) type = it.data().type; @@ -89,7 +89,7 @@ TQString TypeMapper::type( const Schema::Attribute *attribute ) const TQString type; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) type = it.data().type; @@ -104,7 +104,7 @@ TQString TypeMapper::type( const Schema::Attribute *attribute ) const TQString TypeMapper::type( const TQString &typeName ) const { // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) return it.data().type; @@ -147,7 +147,7 @@ TQStringList TypeMapper::header( const Schema::Element *element ) const TQStringList headers; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) headers.append( it.data().header ); @@ -167,7 +167,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Element *element TQMap<TQString, TQString> headers; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) @@ -193,7 +193,7 @@ TQStringList TypeMapper::header( const Schema::Attribute *attribute ) const TQStringList headers; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) headers.append( it.data().header ); @@ -210,7 +210,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Attribute *attrib TQMap<TQString, TQString> headers; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) @@ -228,7 +228,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const Schema::Attribute *attrib TQStringList TypeMapper::header( const TQString &typeName ) const { - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) return it.data().header; @@ -249,7 +249,7 @@ TQMap<TQString, TQString> TypeMapper::headerDec( const TQString &typeName ) cons TQMap<TQString, TQString> headers; // check basic types - TQMap<TQString, TypeInfo>::ConstIterator it = mMap.tqfind( typeName ); + TQMap<TQString, TypeInfo>::ConstIterator it = mMap.find( typeName ); if ( it != mMap.end() ) { if ( !it.data().header.isEmpty() ) { if ( it.data().type == TQBYTEARRAY_OBJECT_NAME_STRING ) diff --git a/kode/kxml_compiler/creator.cpp b/kode/kxml_compiler/creator.cpp index 66dccccbb..3d4983f93 100644 --- a/kode/kxml_compiler/creator.cpp +++ b/kode/kxml_compiler/creator.cpp @@ -137,7 +137,7 @@ void Creator::createClass( Element *element ) { TQString className = upperFirst( element->name ); - if ( mProcessedClasses.tqfind( className ) != mProcessedClasses.end() ) { + if ( mProcessedClasses.find( className ) != mProcessedClasses.end() ) { return; } @@ -621,7 +621,7 @@ void Creator::createElementParserDom( KODE::Class &c, Element *e ) void Creator::registerListTypedef( const TQString &type ) { - if ( !mListTypedefs.tqcontains( type ) ) mListTypedefs.append( type ); + if ( !mListTypedefs.contains( type ) ) mListTypedefs.append( type ); } void Creator::createListTypedefs() diff --git a/kode/kxml_compiler/kxml_compiler.cpp b/kode/kxml_compiler/kxml_compiler.cpp index a4f8178b3..71720d6b9 100644 --- a/kode/kxml_compiler/kxml_compiler.cpp +++ b/kode/kxml_compiler/kxml_compiler.cpp @@ -83,7 +83,7 @@ int main( int argc, char **argv ) TQString dtdFilename = args->url( 0 ).path(); TQString baseName = args->url( 0 ).fileName(); - int pos = baseName.tqfindRev( '.' ); + int pos = baseName.findRev( '.' ); if ( pos > 0 ) baseName = baseName.left( pos ); @@ -143,7 +143,7 @@ int main( int argc, char **argv ) for( it = start->elements.begin(); it != start->elements.end(); ++it ) { c.setExternalClassPrefix( c.upperFirst( (*it)->name ) ); c.createFileParser( *it ); - c.createFileWriter( *it, dtdFilename.tqreplace( "rng", "dtd" ) ); + c.createFileWriter( *it, dtdFilename.replace( "rng", "dtd" ) ); } c.createListTypedefs(); diff --git a/kode/kxml_compiler/parser.cpp b/kode/kxml_compiler/parser.cpp index 3a0c7c3f7..9a123581b 100644 --- a/kode/kxml_compiler/parser.cpp +++ b/kode/kxml_compiler/parser.cpp @@ -97,10 +97,10 @@ Element *Parser::parse( const TQDomElement &docElement ) parseElement( e1, d, Pattern() ); Element::List definitions; TQMap<TQString,Element::List >::ConstIterator it; - it = mDefinitionMap.tqfind( d->name ); + it = mDefinitionMap.find( d->name ); if ( it != mDefinitionMap.end() ) definitions = *it; definitions.append( d ); - mDefinitionMap.tqreplace( d->name, definitions ); + mDefinitionMap.replace( d->name, definitions ); } else if ( e1.tagName() == "start" ) { start = new Element; parseElement( e1, start, Pattern() ); @@ -192,7 +192,7 @@ void Parser::substituteReferences( Element *s ) r->substituted = true; } TQMap<TQString,Element::List >::ConstIterator it1; - it1 = mDefinitionMap.tqfind( r->name ); + it1 = mDefinitionMap.find( r->name ); if ( it1 != mDefinitionMap.end() ) { Element::List elements = *it1; Element::List::ConstIterator it4; diff --git a/kode/printer.cpp b/kode/printer.cpp index 761823dd3..6f36d30eb 100644 --- a/kode/printer.cpp +++ b/kode/printer.cpp @@ -328,7 +328,7 @@ void Printer::printHeader( const File &f ) // Create include guard TQString className = f.filename(); - className.tqreplace( "-", "_" ); + className.replace( "-", "_" ); TQString includeGuard; if ( !f.nameSpace().isEmpty() ) includeGuard += f.nameSpace().upper() + "_"; @@ -348,7 +348,7 @@ void Printer::printHeader( const File &f ) TQStringList includes = (*it).headerIncludes(); TQStringList::ConstIterator it2; for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) { - if ( processed.tqfind( *it2 ) == processed.end() ) { + if ( processed.find( *it2 ) == processed.end() ) { out += "#include <" + *it2 + ">"; processed.append( *it2 ); } @@ -363,7 +363,7 @@ void Printer::printHeader( const File &f ) TQStringList decls = (*it).forwardDeclarations(); TQStringList::ConstIterator it2; for( it2 = decls.begin(); it2 != decls.end(); ++it2 ) { - if ( processed.tqfind( *it2 ) == processed.end() ) { + if ( processed.find( *it2 ) == processed.end() ) { out += "class " + *it2 + ";"; processed.append( *it2 ); } @@ -443,7 +443,7 @@ void Printer::printImplementation( const File &f, bool createHeaderInclude ) TQStringList includes = (*it).includes(); TQStringList::ConstIterator it2; for( it2 = includes.begin(); it2 != includes.end(); ++it2 ) { - if ( processed.tqfind( *it2 ) == processed.end() ) { + if ( processed.find( *it2 ) == processed.end() ) { out += "#include <" + *it2 + ">"; processed.append( *it2 ); } |