diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-13 17:43:39 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-13 17:43:39 -0600 |
commit | 359640943bcf155faa9a067dde9e00a123276290 (patch) | |
tree | fb3d55ea5e18949042fb0064123fb73d2b1eb932 /src/moc/moc.y | |
parent | a829bcdc533e154000803d517200d32fe762e85c (diff) | |
download | tqt3-359640943bcf155faa9a067dde9e00a123276290.tar.gz tqt3-359640943bcf155faa9a067dde9e00a123276290.zip |
Automated update from Qt3
Diffstat (limited to 'src/moc/moc.y')
-rw-r--r-- | src/moc/moc.y | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/moc/moc.y b/src/moc/moc.y index ce1867373..8de0cd73e 100644 --- a/src/moc/moc.y +++ b/src/moc/moc.y @@ -635,8 +635,8 @@ Enum *tmpEnum; // current enum Access tmpAccess; // current access permission Access subClassPerm; // current access permission -bool Q_OBJECTdetected; // TRUE if current class - // contains the Q_OBJECT macro +bool TQ_OBJECTdetected; // TRUE if current class + // contains the TQ_OBJECT macro bool Q_PROPERTYdetected; // TRUE if current class // contains at least one Q_PROPERTY, // Q_OVERRIDE, Q_SETS or Q_ENUMS macro @@ -746,7 +746,7 @@ extern "C" int hack_isatty( int ) %token SIGNALS %token SLOTS -%token Q_OBJECT +%token TQ_OBJECT %token Q_PROPERTY %token Q_OVERRIDE %token Q_CLASSINFO @@ -1178,13 +1178,13 @@ whatever: IDENTIFIER class_head: class_key qualified_class_name { g->className = $2; if ( g->className == "TQObject" ) - Q_OBJECTdetected = TRUE; + TQ_OBJECTdetected = TRUE; } | class_key IDENTIFIER /* possible DLL EXPORT macro */ class_name { g->className = $3; if ( g->className == "TQObject" ) - Q_OBJECTdetected = TRUE; + TQ_OBJECTdetected = TRUE; } ; @@ -1244,13 +1244,13 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } slot_area | SIGNALS { BEGIN QT_DEF; } ':' opt_signal_declarations - | Q_OBJECT { + | TQ_OBJECT { if ( tmpAccess ) - moc_warn("Q_OBJECT is not in the private" + moc_warn("TQ_OBJECT is not in the private" " section of the class.\n" - "Q_OBJECT is a macro that resets" + "TQ_OBJECT is a macro that resets" " access permission to \"private\"."); - Q_OBJECTdetected = TRUE; + TQ_OBJECTdetected = TRUE; } | Q_PROPERTY { tmpYYStart = YY_START; tmpPropOverride = FALSE; @@ -1734,7 +1734,7 @@ int main( int argc, char **argv ) } else if ( opt == "v" ) { // version number fprintf( stderr, "TQt Meta Object Compiler version %d" " (TQt %s)\n", formatRevision, - QT_VERSION_STR ); + TQT_VERSION_STR ); cleanup(); return 1; } else if ( opt == "k" ) { // stop on errors @@ -2018,7 +2018,7 @@ void initClass() // prepare for new class { tmpAccess = Private; subClassPerm = Private; - Q_OBJECTdetected = FALSE; + TQ_OBJECTdetected = FALSE; Q_PROPERTYdetected = FALSE; skipClass = FALSE; templateClass = FALSE; @@ -2154,7 +2154,7 @@ inline bool isSpace( char x ) static TQCString rmWS( const char *src ) { - TQCString result( qstrlen(src)+1 ); + TQCString result( tqstrlen(src)+1 ); char *d = result.data(); char *s = (char *)src; char last = 0; @@ -2254,7 +2254,7 @@ int yywrap() // more files? char *stradd( const char *s1, const char *s2 ) // adds two strings { - char *n = new char[qstrlen(s1)+qstrlen(s2)+1]; + char *n = new char[tqstrlen(s1)+tqstrlen(s2)+1]; qstrcpy( n, s1 ); strcat( n, s2 ); return n; @@ -2262,7 +2262,7 @@ char *stradd( const char *s1, const char *s2 ) // adds two strings char *stradd( const char *s1, const char *s2, const char *s3 )// adds 3 strings { - char *n = new char[qstrlen(s1)+qstrlen(s2)+qstrlen(s3)+1]; + char *n = new char[tqstrlen(s1)+tqstrlen(s2)+tqstrlen(s3)+1]; qstrcpy( n, s1 ); strcat( n, s2 ); strcat( n, s3 ); @@ -2272,7 +2272,7 @@ char *stradd( const char *s1, const char *s2, const char *s3 )// adds 3 strings char *stradd( const char *s1, const char *s2, const char *s3, const char *s4 )// adds 4 strings { - char *n = new char[qstrlen(s1)+qstrlen(s2)+qstrlen(s3)+qstrlen(s4)+1]; + char *n = new char[tqstrlen(s1)+tqstrlen(s2)+tqstrlen(s3)+tqstrlen(s4)+1]; qstrcpy( n, s1 ); strcat( n, s2 ); strcat( n, s3 ); @@ -2283,7 +2283,7 @@ char *stradd( const char *s1, const char *s2, char *straddSpc( const char *s1, const char *s2 ) { - char *n = new char[qstrlen(s1)+qstrlen(s2)+2]; + char *n = new char[tqstrlen(s1)+tqstrlen(s2)+2]; qstrcpy( n, s1 ); strcat( n, " " ); strcat( n, s2 ); @@ -2292,7 +2292,7 @@ char *straddSpc( const char *s1, const char *s2 ) char *straddSpc( const char *s1, const char *s2, const char *s3 ) { - char *n = new char[qstrlen(s1)+qstrlen(s2)+qstrlen(s3)+3]; + char *n = new char[tqstrlen(s1)+tqstrlen(s2)+tqstrlen(s3)+3]; qstrcpy( n, s1 ); strcat( n, " " ); strcat( n, s2 ); @@ -2304,7 +2304,7 @@ char *straddSpc( const char *s1, const char *s2, const char *s3 ) char *straddSpc( const char *s1, const char *s2, const char *s3, const char *s4 ) { - char *n = new char[qstrlen(s1)+qstrlen(s2)+qstrlen(s3)+qstrlen(s4)+4]; + char *n = new char[tqstrlen(s1)+tqstrlen(s2)+tqstrlen(s3)+tqstrlen(s4)+4]; qstrcpy( n, s1 ); strcat( n, " " ); strcat( n, s2 ); @@ -2731,9 +2731,9 @@ int generateProps() // Create meta data // if ( g->props.count() ) { - if ( displayWarnings && !Q_OBJECTdetected ) + if ( displayWarnings && !TQ_OBJECTdetected ) moc_err("The declaration of the class \"%s\" contains properties" - " but no Q_OBJECT macro.", g->className.data()); + " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, "#ifndef QT_NO_PROPERTIES\n" ); @@ -2813,9 +2813,9 @@ int generateClassInfos() if ( g->infos.isEmpty() ) return 0; - if ( displayWarnings && !Q_OBJECTdetected ) + if ( displayWarnings && !TQ_OBJECTdetected ) moc_err("The declaration of the class \"%s\" contains class infos" - " but no Q_OBJECT macro.", g->className.data()); + " but no TQ_OBJECT macro.", g->className.data()); fprintf( out, " static const TQClassInfo classinfo_tbl[] = {\n" ); int i = 0; @@ -2833,7 +2833,7 @@ void generateClass() // generate C++ source code for a class { const char *hdr1 = "/****************************************************************************\n" "** %s meta object code from reading C++ file '%s'\n**\n"; - const char *hdr2 = "** Created: %s\n" + const char *hdr2 = "** Created: %s\n"; const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n"; const char *hdr4 = "*****************************************************************************/\n\n"; int i; @@ -2841,22 +2841,22 @@ void generateClass() // generate C++ source code for a class if ( skipClass ) // don't generate for class return; - if ( !Q_OBJECTdetected ) { + if ( !TQ_OBJECTdetected ) { if ( g->signals.count() == 0 && g->slots.count() == 0 && g->props.count() == 0 && g->infos.count() == 0 ) return; if ( displayWarnings && (g->signals.count() + g->slots.count()) != 0 ) moc_err("The declaration of the class \"%s\" contains signals " - "or slots\n\t but no Q_OBJECT macro.", g->className.data()); + "or slots\n\t but no TQ_OBJECT macro.", g->className.data()); } else { if ( g->superClassName.isEmpty() ) moc_err("The declaration of the class \"%s\" contains the\n" - "\tQ_OBJECT macro but does not inherit from any class!\n" + "\tTQ_OBJECT macro but does not inherit from any class!\n" "\tInherit from TQObject or one of its descendants" - " or remove Q_OBJECT.", g->className.data() ); + " or remove TQ_OBJECT.", g->className.data() ); } if ( templateClass ) { // don't generate for class moc_err( "Sorry, TQt does not support templates that contain\n" - "\tsignals, slots or Q_OBJECT." ); + "\tsignals, slots or TQ_OBJECT." ); return; } g->generatedCode = TRUE; @@ -2913,7 +2913,7 @@ void generateClass() // generate C++ source code for a class fprintf( out, "#error \"This file was generated using the moc from %s." " It\"\n#error \"cannot be used with the include files from" " this version of TQt.\"\n#error \"(The moc has changed too" - " much.)\"\n", QT_VERSION_STR ); + " much.)\"\n", TQT_VERSION_STR ); fprintf( out, "#endif\n\n" ); } else { fprintf( out, "\n\n" ); @@ -3114,7 +3114,7 @@ void generateClass() // generate C++ source code for a class } if ( !predef_call_func && !included_list_headers ) { - // yes we need it, because otherwise QT_VERSION may not be defined + // yes we need it, because otherwise TQT_VERSION may not be defined fprintf( out, "\n#include <%sntqobjectdefs.h>\n", (const char*)g->qtPath ); fprintf( out, "#include <%sntqsignalslotimp.h>\n", (const char*)g->qtPath ); included_list_headers = TRUE; |