diff options
author | Timothy Pearson <[email protected]> | 2011-08-09 22:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-08-09 22:25:47 -0500 |
commit | eaa7ee2e0bbca40ba3173c4304f81957e8964291 (patch) | |
tree | 4f793aa48a5080aedc94ce6e519c3b86708f2b88 /tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp | |
parent | 79a9d7a46a20d4a0923bc06fc471fdc2176ef865 (diff) | |
download | experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.tar.gz experimental-eaa7ee2e0bbca40ba3173c4304f81957e8964291.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
Diffstat (limited to 'tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp')
-rw-r--r-- | tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp b/tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp index 3d53e57..21f7dc1 100644 --- a/tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp +++ b/tqtinterface/qt4/src/tqmoc/tqmoc_yacc.cpp @@ -167,7 +167,7 @@ TQCString castToUType( TQCString ctype ) if ( ctype.right(1) == "&" ) ctype = ctype.left( ctype.length() - 1 ); if( ctype.right(1) == "]") { - int lb = ctype.tqfindRev('['); + int lb = ctype.findRev('['); if(lb != -1) ctype = ctype.left(lb) + "*"; } @@ -331,7 +331,7 @@ bool isVariantType( const char* type ) */ void fixRightAngles( TQCString *str ) { - str->tqreplace( TQRegExp(">>"), "> >" ); + str->replace( TQRegExp(">>"), "> >" ); } static TQCString rmWS( const char * ); @@ -448,7 +448,7 @@ class FuncList : public TQPtrList<Function> { // list of member functions public: FuncList( bool autoDelete = FALSE ) { setAutoDelete( autoDelete ); } - FuncList tqfind( const char* name ) + FuncList find( const char* name ) { FuncList result; for ( TQPtrListIterator<Function> it(*this); it.current(); ++it ) { @@ -515,8 +515,8 @@ struct Property int oredEnum; // If the enums item may be ored. That means the data type is int. // Allowed values are 1 (True), 0 (False), and -1 (Unset) - TQCString enumsettype; // tqcontains the set function type in case of oredEnum - TQCString enumgettype; // tqcontains the get function type in case of oredEnum + TQCString enumsettype; // contains the set function type in case of oredEnum + TQCString enumgettype; // contains the get function type in case of oredEnum enum Specification { Unspecified, Class, Reference, Pointer, ConstCharStar }; Specification sspec; @@ -651,9 +651,9 @@ Access tmpAccess; // current access permission Access subClassPerm; // current access permission bool TQ_OBJECTdetected; // TRUE if current class - // tqcontains the TQ_OBJECT macro + // contains the TQ_OBJECT macro bool Q_PROPERTYdetected; // TRUE if current class - // tqcontains at least one Q_PROPERTY, + // contains at least one Q_PROPERTY, // TQ_OVERRIDE, TQ_SETS or TQ_ENUMS macro bool tmpPropOverride; // current property override setting @@ -4478,7 +4478,7 @@ parser_reg::~parser_reg() int yyparse(); -void tqreplace( char *s, char c1, char c2 ); +void replace( char *s, char c1, char c2 ); void setDefaultIncludeFile() { @@ -4556,7 +4556,7 @@ int main( int argc, char **argv ) } else { g->qtPath = opt.tqstringFromPos(1); } - tqreplace(g->qtPath.data(),'\\','/'); + replace(g->qtPath.data(),'\\','/'); if ( g->qtPath.right(1) != "/" ) g->qtPath += '/'; } else if ( opt == "v" ) { // version number @@ -4585,7 +4585,7 @@ int main( int argc, char **argv ) } if ( autoInclude ) { - int ppos = g->fileName.tqfindRev('.'); + int ppos = g->fileName.findRev('.'); if ( ppos != -1 && tolower( g->fileName[ppos + 1] ) == 'h' ) g->noInclude = FALSE; else @@ -4746,7 +4746,7 @@ tqmoc_status do_tqmoc( CWPluginContext ctx, const TQCString &fin, const TQCStrin return tqmoc_success; } #endif -void tqreplace( char *s, char c1, char c2 ) +void replace( char *s, char c1, char c2 ) { if ( !s ) return; @@ -4923,7 +4923,7 @@ int openNameSpaceForMetaObject( FILE *out ) } TQCString nm = g->className; int pos; - while( (pos = nm.tqfind( "::" )) != -1 ) { + while( (pos = nm.find( "::" )) != -1 ) { TQCString spaceName = nm.left( pos ); nm = nm.right( nm.length() - pos - 2 ); if ( !spaceName.isEmpty() ) { @@ -5162,10 +5162,10 @@ TQCString purestSuperClassName() Make sure qualified template arguments (e.g., foo<bar::baz>) don't interfere. */ - int pos = sc.tqfindRev( "::", sc.tqfind( '<' ) ); + int pos = sc.findRev( "::", sc.find( '<' ) ); if ( pos != -1 ) { sc = sc.right( sc.length() - pos - 2 ); - pos = c.tqfindRev( "::" ); + pos = c.findRev( "::" ); if ( pos != -1 ) c = c.right( c.length() - pos - 2 ); if ( sc == c ) @@ -5177,7 +5177,7 @@ TQCString purestSuperClassName() TQCString callablePurestSuperClassName() { TQCString sc = purestSuperClassName(); -// if (sc.tqfind("TQ") != 0) { +// if (sc.find("TQ") != 0) { return TQCString("static_cast<TQObject*>(static_cast<TQT_BASE_OBJECT_NAME*>(this))->"); // } // else { @@ -5193,7 +5193,7 @@ TQCString qualifiedClassName() TQCString callableQualifiedClassName() { TQCString sc = qualifiedClassName(); -// if (sc.tqfind("TQ") != 0) { +// if (sc.find("TQ") != 0) { return TQCString("static_cast<TQObject*>(static_cast<TQT_BASE_OBJECT_NAME*>(this))->"); // } // else { @@ -5296,7 +5296,7 @@ int enumIndex( const char* type ) bool isEnumType( const char* type ) { - return enumIndex( type ) >= 0 || ( g->qtEnums.tqcontains( type ) || g->qtSets.tqcontains( type ) ); + return enumIndex( type ) >= 0 || ( g->qtEnums.contains( type ) || g->qtSets.contains( type ) ); } bool isPropertyType( const char* type ) @@ -5352,7 +5352,7 @@ int generateProps() // verify get function if ( !p->get.isEmpty() ) { - FuncList candidates = g->propfuncs.tqfind( p->get ); + FuncList candidates = g->propfuncs.find( p->get ); for ( Function* f = candidates.first(); f; f = candidates.next() ) { if ( f->qualifier != "const" ) // get functions must be const continue; @@ -5466,7 +5466,7 @@ int generateProps() // verify set function if ( !p->set.isEmpty() ) { - FuncList candidates = g->propfuncs.tqfind( p->set ); + FuncList candidates = g->propfuncs.find( p->set ); for ( Function* f = candidates.first(); f; f = candidates.next() ) { if ( !f->args || f->args->isEmpty() ) continue; @@ -5582,7 +5582,7 @@ int generateProps() // if ( g->props.count() ) { if ( displayWarnings && !TQ_OBJECTdetected ) - tqmoc_err("The declaration of the class \"%s\" tqcontains properties" + tqmoc_err("The declaration of the class \"%s\" contains properties" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, "#ifndef TQT_NO_PROPERTIES\n" ); @@ -5664,7 +5664,7 @@ int generateClassInfos() return 0; if ( displayWarnings && !TQ_OBJECTdetected ) - tqmoc_err("The declaration of the class \"%s\" tqcontains class infos" + tqmoc_err("The declaration of the class \"%s\" contains class infos" " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, " static const TQClassInfo classinfo_tbl[] = {\n" ); @@ -5695,11 +5695,11 @@ void generateClass() // generate C++ source code for a class if ( g->tqsignals.count() == 0 && g->tqslots.count() == 0 && g->props.count() == 0 && g->infos.count() == 0 ) return; if ( displayWarnings && (g->tqsignals.count() + g->tqslots.count()) != 0 ) - tqmoc_err("The declaration of the class \"%s\" tqcontains tqsignals " + tqmoc_err("The declaration of the class \"%s\" contains tqsignals " "or tqslots\n\t but no TQ_OBJECT macro.", g->className.data()); } else { if ( g->superClassName.isEmpty() ) - tqmoc_err("The declaration of the class \"%s\" tqcontains the\n" + tqmoc_err("The declaration of the class \"%s\" contains the\n" "\tTQ_OBJECT macro but does not inherit from any class!\n" "\tInherit from TQObject or one of its descendants" " or remove TQ_OBJECT.", g->className.data() ); @@ -5840,7 +5840,7 @@ void generateClass() // generate C++ source code for a class if ( isTQObject ) fprintf( out, " TQMetaObject* parentObject = staticTQtMetaObject();\n" ); else if ( !g->superClassName.isEmpty() ) - if (g->superClassName.tqfind("TQ") == 0) { // [FIXME] Verify that this will always be able to detect a TQt base class, even if intermediate classes do not start with TQ + if (g->superClassName.find("TQ") == 0) { // [FIXME] Verify that this will always be able to detect a TQt base class, even if intermediate classes do not start with TQ fprintf( out, " TQMetaObject* parentObject = %s::staticMetaObject();\n", (const char*)g->superClassName ); } else { @@ -5928,8 +5928,8 @@ void generateClass() // generate C++ source code for a class for ( const char* cname = g->multipleSuperClasses.first(); cname; cname = g->multipleSuperClasses.next() ) { fprintf( out, " if ( !qstrcmp( clname, \"%s\" ) )\n", cname); TQCString fixed(cname); - while (fixed.tqfind(">>") != -1) - fixed = fixed.tqreplace(">>", "> >"); + while (fixed.find(">>") != -1) + fixed = fixed.replace(">>", "> >"); fprintf( out, "\treturn (%s*)this;\n", fixed.data()); } if ( !g->superClassName.isEmpty() && !isTQObject ) @@ -6400,10 +6400,10 @@ void addEnum() } // Only look at types mentioned in TQ_ENUMS and TQ_SETS - if ( g->qtEnums.tqcontains( tmpEnum->name ) || g->qtSets.tqcontains( tmpEnum->name ) ) + if ( g->qtEnums.contains( tmpEnum->name ) || g->qtSets.contains( tmpEnum->name ) ) { g->enums.append( tmpEnum ); - if ( g->qtSets.tqcontains( tmpEnum->name ) ) + if ( g->qtSets.contains( tmpEnum->name ) ) tmpEnum->set = TRUE; else tmpEnum->set = FALSE; |