summaryrefslogtreecommitdiffstats
path: root/experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y')
-rw-r--r--experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y56
1 files changed, 28 insertions, 28 deletions
diff --git a/experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y b/experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y
index 69ac26965..927ec4790 100644
--- a/experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y
+++ b/experimental/tqtinterface/qt4/src/tqmoc/tqmoc.y
@@ -152,7 +152,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) + "*";
}
@@ -316,7 +316,7 @@ bool isVariantType( const char* type )
*/
void fixRightAngles( TQCString *str )
{
- str->tqreplace( TQRegExp(">>"), "> >" );
+ str->replace( TQRegExp(">>"), "> >" );
}
static TQCString rmWS( const char * );
@@ -433,7 +433,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 ) {
@@ -500,8 +500,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;
@@ -636,9 +636,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
@@ -1652,7 +1652,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()
{
@@ -1730,7 +1730,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
@@ -1759,7 +1759,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
@@ -1920,7 +1920,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;
@@ -2097,7 +2097,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() ) {
@@ -2336,10 +2336,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 )
@@ -2351,7 +2351,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 {
@@ -2367,7 +2367,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 {
@@ -2470,7 +2470,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 )
@@ -2526,7 +2526,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;
@@ -2640,7 +2640,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;
@@ -2756,7 +2756,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" );
@@ -2838,7 +2838,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" );
@@ -2869,11 +2869,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() );
@@ -3014,7 +3014,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 {
@@ -3102,8 +3102,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 )
@@ -3574,10 +3574,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;