diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-10-21 18:55:44 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-10-21 18:55:44 -0500 |
commit | 6b6c9a354dbda88664fb1aebda9bb1df77a4aa2d (patch) | |
tree | f13bbebb928d6448ff186bc596fa58fa6b8892d9 /src/moc | |
parent | 56cd55070ee6c5267fde1aae4d5251e400dea64d (diff) | |
parent | 7608f0043b6dfc0b1adcaa8912793e1d3fe7b636 (diff) | |
download | tqt3-6b6c9a354dbda88664fb1aebda9bb1df77a4aa2d.tar.gz tqt3-6b6c9a354dbda88664fb1aebda9bb1df77a4aa2d.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tqt3
Diffstat (limited to 'src/moc')
-rw-r--r-- | src/moc/moc.l | 20 | ||||
-rw-r--r-- | src/moc/moc.y | 50 | ||||
-rw-r--r-- | src/moc/moc_lex.cpp | 20 | ||||
-rw-r--r-- | src/moc/moc_yacc.cpp | 52 | ||||
-rw-r--r-- | src/moc/moc_yacc.h | 20 |
5 files changed, 81 insertions, 81 deletions
diff --git a/src/moc/moc.l b/src/moc/moc.l index a917b03e3..868f9c0a6 100644 --- a/src/moc/moc.l +++ b/src/moc/moc.l @@ -127,11 +127,11 @@ STRING {ALMOSTSTRING}\" <QT_DEF>"TQ_OBJECT" { X; return TQ_OBJECT; } <QT_DEF>"signals" { X; return SIGNALS; } <QT_DEF>"slots" { X; return SLOTS; } -<QT_DEF>"Q_CLASSINFO" { X; return Q_CLASSINFO; } -<QT_DEF>"Q_PROPERTY" { X; return Q_PROPERTY; } -<QT_DEF>"Q_OVERRIDE" { X; return Q_OVERRIDE; } -<QT_DEF>"Q_ENUMS" { X; return Q_ENUMS; } -<QT_DEF>"Q_SETS" { X; return Q_SETS; } +<QT_DEF>"TQ_CLASSINFO" { X; return TQ_CLASSINFO; } +<QT_DEF>"TQ_PROPERTY" { X; return TQ_PROPERTY; } +<QT_DEF>"TQ_OVERRIDE" { X; return TQ_OVERRIDE; } +<QT_DEF>"TQ_ENUMS" { X; return TQ_ENUMS; } +<QT_DEF>"TQ_SETS" { X; return TQ_SETS; } <IN_FCT>"{" { fctLevel++;Y; } <IN_FCT>"}" { fctLevel--;Y;if (fctLevel==0){X;return '}';}} @@ -143,17 +143,17 @@ STRING {ALMOSTSTRING}\" <IN_CLASS>"private" { X;if( classPLevel == 1 ) return PRIVATE; } <IN_CLASS>"signals" { X;if( classPLevel == 1 ) return SIGNALS; } <IN_CLASS>"slots" { X;if( classPLevel == 1 ) return SLOTS; } -<IN_CLASS>"Q_CLASSINFO" { X;if( classPLevel == 1 ) return Q_CLASSINFO; } +<IN_CLASS>"TQ_CLASSINFO" { X;if( classPLevel == 1 ) return TQ_CLASSINFO; } <IN_CLASS>"TQ_OBJECT" { X; if ( classPLevel == 1 ) return TQ_OBJECT; else if ( classPLevel > 1 ) moc_warn( "Cannot use TQ_OBJECT in nested class." ); } -<IN_CLASS>"Q_PROPERTY" { X;if( classPLevel == 1 ) return Q_PROPERTY; } -<IN_CLASS>"Q_OVERRIDE" { X;if( classPLevel == 1 ) return Q_OVERRIDE; } -<IN_CLASS>"Q_ENUMS" { X;if( classPLevel == 1 ) return Q_ENUMS; } -<IN_CLASS>"Q_SETS" { X;if( classPLevel == 1 ) return Q_SETS; } +<IN_CLASS>"TQ_PROPERTY" { X;if( classPLevel == 1 ) return TQ_PROPERTY; } +<IN_CLASS>"TQ_OVERRIDE" { X;if( classPLevel == 1 ) return TQ_OVERRIDE; } +<IN_CLASS>"TQ_ENUMS" { X;if( classPLevel == 1 ) return TQ_ENUMS; } +<IN_CLASS>"TQ_SETS" { X;if( classPLevel == 1 ) return TQ_SETS; } <IN_NAMESPACE>"{" { namespacePLevel++;Y; } <IN_NAMESPACE>"}" { namespacePLevel--;Y;if (namespacePLevel == 0) diff --git a/src/moc/moc.y b/src/moc/moc.y index afbf3988d..2826274ca 100644 --- a/src/moc/moc.y +++ b/src/moc/moc.y @@ -466,7 +466,7 @@ struct Property designable( d ), scriptable( sc ), override( ov ), oredEnum( -1 ) { /* - The Q_PROPERTY construct cannot contain any commas, since + The TQ_PROPERTY construct cannot contain any commas, since commas separate macro arguments. We therefore expect users to type "TQMap" instead of "TQMap<TQString, TQVariant>". For coherence, we also expect the same for @@ -581,7 +581,7 @@ class parser_reg { PropList props; // list of all properties ClassInfoList infos; // list of all class infos -// Used to store the values in the Q_PROPERTY macro +// Used to store the values in the TQ_PROPERTY macro TQCString propWrite; // set function TQCString propRead; // get function TQCString propReset; // reset function @@ -590,8 +590,8 @@ class parser_reg { TQCString propScriptable; // "true", "false" or function or empty if not specified bool propOverride; // Wether OVERRIDE was detected - TQStrList qtEnums; // Used to store the contents of Q_ENUMS - TQStrList qtSets; // Used to store the contents of Q_SETS + TQStrList qtEnums; // Used to store the contents of TQ_ENUMS + TQStrList qtSets; // Used to store the contents of TQ_SETS }; @@ -637,9 +637,9 @@ Access subClassPerm; // current access permission 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 +bool TQ_PROPERTYdetected; // TRUE if current class + // contains at least one TQ_PROPERTY, + // TQ_OVERRIDE, TQ_SETS or TQ_ENUMS macro bool tmpPropOverride; // current property override setting int tmpYYStart; // Used to store the lexers current mode @@ -747,11 +747,11 @@ extern "C" int hack_isatty( int ) %token SIGNALS %token SLOTS %token TQ_OBJECT -%token Q_PROPERTY -%token Q_OVERRIDE -%token Q_CLASSINFO -%token Q_ENUMS -%token Q_SETS +%token TQ_PROPERTY +%token TQ_OVERRIDE +%token TQ_CLASSINFO +%token TQ_ENUMS +%token TQ_SETS %token READ %token WRITE @@ -1252,36 +1252,36 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } " access permission to \"private\"."); TQ_OBJECTdetected = TRUE; } - | Q_PROPERTY { tmpYYStart = YY_START; + | TQ_PROPERTY { tmpYYStart = YY_START; tmpPropOverride = FALSE; BEGIN IN_PROPERTY; } '(' property ')' { BEGIN tmpYYStart; } opt_property_candidates - | Q_OVERRIDE { tmpYYStart = YY_START; + | TQ_OVERRIDE { tmpYYStart = YY_START; tmpPropOverride = TRUE; BEGIN IN_PROPERTY; } '(' property ')' { BEGIN tmpYYStart; } opt_property_candidates - | Q_CLASSINFO { tmpYYStart = YY_START; BEGIN IN_CLASSINFO; } + | TQ_CLASSINFO { tmpYYStart = YY_START; BEGIN IN_CLASSINFO; } '(' STRING ',' STRING ')' { g->infos.append( new ClassInfo( $4, $6 ) ); BEGIN tmpYYStart; } opt_property_candidates - | Q_ENUMS { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } + | TQ_ENUMS { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } '(' qt_enums ')' { - Q_PROPERTYdetected = TRUE; + TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; } opt_property_candidates - | Q_SETS { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } + | TQ_SETS { tmpYYStart = YY_START; BEGIN IN_PROPERTY; } '(' qt_sets ')' { - Q_PROPERTYdetected = TRUE; + TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; } opt_property_candidates @@ -1290,7 +1290,7 @@ obj_member_area: qt_access_specifier { BEGIN QT_DEF; } slot_area: SIGNALS ':' { moc_err( "Signals cannot " "have access specifiers" ); } | SLOTS ':' opt_slot_declarations - | ':' { if ( tmpAccess == Public && Q_PROPERTYdetected ) + | ':' { if ( tmpAccess == Public && TQ_PROPERTYdetected ) BEGIN QT_DEF; else BEGIN IN_CLASS; @@ -1572,7 +1572,7 @@ property: IDENTIFIER IDENTIFIER if ( g->propRead.isEmpty() && !g->propOverride ) moc_err( "A property must at least feature a read method." ); checkPropertyName( $2 ); - Q_PROPERTYdetected = TRUE; + TQ_PROPERTYdetected = TRUE; // Avoid duplicates for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) { if ( lit.current()->name == $2 ) { @@ -2019,7 +2019,7 @@ void initClass() // prepare for new class tmpAccess = Private; subClassPerm = Private; TQ_OBJECTdetected = FALSE; - Q_PROPERTYdetected = FALSE; + TQ_PROPERTYdetected = FALSE; skipClass = FALSE; templateClass = FALSE; g->slots.clear(); @@ -2555,7 +2555,7 @@ int generateProps() if ( p->getfunc == 0 ) { if ( displayWarnings ) { - // Is the type a set, that means, mentioned in Q_SETS? + // Is the type a set, that means, mentioned in TQ_SETS? bool set = FALSE; for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit ) if ( lit.current()->name == p->type && lit.current()->set ) @@ -2671,7 +2671,7 @@ int generateProps() if ( p->setfunc == 0 ) { if ( displayWarnings ) { - // Is the type a set, that means, mentioned in Q_SETS ? + // Is the type a set, that means, mentioned in TQ_SETS ? bool set = FALSE; for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit ) if ( lit.current()->name == p->type && lit.current()->set ) @@ -3544,7 +3544,7 @@ void addEnum() } } - // Only look at types mentioned in Q_ENUMS and Q_SETS + // Only look at types mentioned in TQ_ENUMS and TQ_SETS if ( g->qtEnums.contains( tmpEnum->name ) || g->qtSets.contains( tmpEnum->name ) ) { g->enums.append( tmpEnum ); diff --git a/src/moc/moc_lex.cpp b/src/moc/moc_lex.cpp index 149489d07..5b76dd4ff 100644 --- a/src/moc/moc_lex.cpp +++ b/src/moc/moc_lex.cpp @@ -1388,27 +1388,27 @@ YY_RULE_SETUP case 8: YY_RULE_SETUP #line 130 "moc.l" -{ X; return Q_CLASSINFO; } +{ X; return TQ_CLASSINFO; } YY_BREAK case 9: YY_RULE_SETUP #line 131 "moc.l" -{ X; return Q_PROPERTY; } +{ X; return TQ_PROPERTY; } YY_BREAK case 10: YY_RULE_SETUP #line 132 "moc.l" -{ X; return Q_OVERRIDE; } +{ X; return TQ_OVERRIDE; } YY_BREAK case 11: YY_RULE_SETUP #line 133 "moc.l" -{ X; return Q_ENUMS; } +{ X; return TQ_ENUMS; } YY_BREAK case 12: YY_RULE_SETUP #line 134 "moc.l" -{ X; return Q_SETS; } +{ X; return TQ_SETS; } YY_BREAK case 13: YY_RULE_SETUP @@ -1459,7 +1459,7 @@ YY_RULE_SETUP case 22: YY_RULE_SETUP #line 146 "moc.l" -{ X;if( classPLevel == 1 ) return Q_CLASSINFO; } +{ X;if( classPLevel == 1 ) return TQ_CLASSINFO; } YY_BREAK case 23: YY_RULE_SETUP @@ -1474,22 +1474,22 @@ YY_RULE_SETUP case 24: YY_RULE_SETUP #line 153 "moc.l" -{ X;if( classPLevel == 1 ) return Q_PROPERTY; } +{ X;if( classPLevel == 1 ) return TQ_PROPERTY; } YY_BREAK case 25: YY_RULE_SETUP #line 154 "moc.l" -{ X;if( classPLevel == 1 ) return Q_OVERRIDE; } +{ X;if( classPLevel == 1 ) return TQ_OVERRIDE; } YY_BREAK case 26: YY_RULE_SETUP #line 155 "moc.l" -{ X;if( classPLevel == 1 ) return Q_ENUMS; } +{ X;if( classPLevel == 1 ) return TQ_ENUMS; } YY_BREAK case 27: YY_RULE_SETUP #line 156 "moc.l" -{ X;if( classPLevel == 1 ) return Q_SETS; } +{ X;if( classPLevel == 1 ) return TQ_SETS; } YY_BREAK case 28: YY_RULE_SETUP diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp index 46a5cfe28..57ee1e861 100644 --- a/src/moc/moc_yacc.cpp +++ b/src/moc/moc_yacc.cpp @@ -481,7 +481,7 @@ struct Property designable( d ), scriptable( sc ), override( ov ), oredEnum( -1 ) { /* - The Q_PROPERTY construct cannot contain any commas, since + The TQ_PROPERTY construct cannot contain any commas, since commas separate macro arguments. We therefore expect users to type "TQMap" instead of "TQMap<TQString, TQVariant>". For coherence, we also expect the same for @@ -596,7 +596,7 @@ class parser_reg { PropList props; // list of all properties ClassInfoList infos; // list of all class infos -// Used to store the values in the Q_PROPERTY macro +// Used to store the values in the TQ_PROPERTY macro TQCString propWrite; // set function TQCString propRead; // get function TQCString propReset; // reset function @@ -605,8 +605,8 @@ class parser_reg { TQCString propScriptable; // "true", "false" or function or empty if not specified bool propOverride; // Wether OVERRIDE was detected - TQStrList qtEnums; // Used to store the contents of Q_ENUMS - TQStrList qtSets; // Used to store the contents of Q_SETS + TQStrList qtEnums; // Used to store the contents of TQ_ENUMS + TQStrList qtSets; // Used to store the contents of TQ_SETS }; @@ -652,9 +652,9 @@ Access subClassPerm; // current access permission 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 +bool TQ_PROPERTYdetected; // TRUE if current class + // contains at least one TQ_PROPERTY, + // TQ_OVERRIDE, TQ_SETS or TQ_ENUMS macro bool tmpPropOverride; // current property override setting int tmpYYStart; // Used to store the lexers current mode @@ -772,11 +772,11 @@ extern "C" int hack_isatty( int ) SIGNALS = 298, SLOTS = 299, TQ_OBJECT = 300, - Q_PROPERTY = 301, - Q_OVERRIDE = 302, - Q_CLASSINFO = 303, - Q_ENUMS = 304, - Q_SETS = 305, + TQ_PROPERTY = 301, + TQ_OVERRIDE = 302, + TQ_CLASSINFO = 303, + TQ_ENUMS = 304, + TQ_SETS = 305, READ = 306, WRITE = 307, STORED = 308, @@ -829,11 +829,11 @@ extern "C" int hack_isatty( int ) #define SIGNALS 298 #define SLOTS 299 #define TQ_OBJECT 300 -#define Q_PROPERTY 301 -#define Q_OVERRIDE 302 -#define Q_CLASSINFO 303 -#define Q_ENUMS 304 -#define Q_SETS 305 +#define TQ_PROPERTY 301 +#define TQ_OVERRIDE 302 +#define TQ_CLASSINFO 303 +#define TQ_ENUMS 304 +#define TQ_SETS 305 #define READ 306 #define WRITE 307 #define STORED 308 @@ -1334,7 +1334,7 @@ static const char *const yytname[] = "ENUM", "CLASS", "STRUCT", "UNION", "ASM", "PRIVATE", "PROTECTED", "PUBLIC", "OPERATOR", "DBL_COLON", "TRIPLE_DOT", "TEMPLATE", "NAMESPACE", "USING", "MUTABLE", "THROW", "SIGNALS", "SLOTS", "TQ_OBJECT", - "Q_PROPERTY", "Q_OVERRIDE", "Q_CLASSINFO", "Q_ENUMS", "Q_SETS", "READ", + "TQ_PROPERTY", "TQ_OVERRIDE", "TQ_CLASSINFO", "TQ_ENUMS", "TQ_SETS", "READ", "WRITE", "STORED", "DESIGNABLE", "SCRIPTABLE", "RESET", "'{'", "'}'", "'='", "';'", "'<'", "'>'", "','", "'['", "']'", "'('", "')'", "'*'", "'&'", "':'", "'+'", "'-'", "'/'", "'%'", "'^'", "'|'", "'~'", "'!'", @@ -3639,7 +3639,7 @@ yyreduce: /* Line 1455 of yacc.c */ #line 1277 "moc.y" { - Q_PROPERTYdetected = TRUE; + TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; } break; @@ -3656,7 +3656,7 @@ yyreduce: /* Line 1455 of yacc.c */ #line 1283 "moc.y" { - Q_PROPERTYdetected = TRUE; + TQ_PROPERTYdetected = TRUE; BEGIN tmpYYStart; } break; @@ -3673,7 +3673,7 @@ yyreduce: /* Line 1455 of yacc.c */ #line 1293 "moc.y" - { if ( tmpAccess == Public && Q_PROPERTYdetected ) + { if ( tmpAccess == Public && TQ_PROPERTYdetected ) BEGIN QT_DEF; else BEGIN IN_CLASS; @@ -4129,7 +4129,7 @@ yyreduce: if ( g->propRead.isEmpty() && !g->propOverride ) moc_err( "A property must at least feature a read method." ); checkPropertyName( (yyvsp[(2) - (4)].string) ); - Q_PROPERTYdetected = TRUE; + TQ_PROPERTYdetected = TRUE; // Avoid duplicates for( TQPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) { if ( lit.current()->name == (yyvsp[(2) - (4)].string) ) { @@ -4845,7 +4845,7 @@ void initClass() // prepare for new class tmpAccess = Private; subClassPerm = Private; TQ_OBJECTdetected = FALSE; - Q_PROPERTYdetected = FALSE; + TQ_PROPERTYdetected = FALSE; skipClass = FALSE; templateClass = FALSE; g->slots.clear(); @@ -5381,7 +5381,7 @@ int generateProps() if ( p->getfunc == 0 ) { if ( displayWarnings ) { - // Is the type a set, that means, mentioned in Q_SETS? + // Is the type a set, that means, mentioned in TQ_SETS? bool set = FALSE; for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit ) if ( lit.current()->name == p->type && lit.current()->set ) @@ -5497,7 +5497,7 @@ int generateProps() if ( p->setfunc == 0 ) { if ( displayWarnings ) { - // Is the type a set, that means, mentioned in Q_SETS ? + // Is the type a set, that means, mentioned in TQ_SETS ? bool set = FALSE; for( TQPtrListIterator<Enum> lit( g->enums ); lit.current(); ++lit ) if ( lit.current()->name == p->type && lit.current()->set ) @@ -6370,7 +6370,7 @@ void addEnum() } } - // Only look at types mentioned in Q_ENUMS and Q_SETS + // Only look at types mentioned in TQ_ENUMS and TQ_SETS if ( g->qtEnums.contains( tmpEnum->name ) || g->qtSets.contains( tmpEnum->name ) ) { g->enums.append( tmpEnum ); diff --git a/src/moc/moc_yacc.h b/src/moc/moc_yacc.h index 84ef25bcd..3b3a7c151 100644 --- a/src/moc/moc_yacc.h +++ b/src/moc/moc_yacc.h @@ -82,11 +82,11 @@ SIGNALS = 298, SLOTS = 299, TQ_OBJECT = 300, - Q_PROPERTY = 301, - Q_OVERRIDE = 302, - Q_CLASSINFO = 303, - Q_ENUMS = 304, - Q_SETS = 305, + TQ_PROPERTY = 301, + TQ_OVERRIDE = 302, + TQ_CLASSINFO = 303, + TQ_ENUMS = 304, + TQ_SETS = 305, READ = 306, WRITE = 307, STORED = 308, @@ -139,11 +139,11 @@ #define SIGNALS 298 #define SLOTS 299 #define TQ_OBJECT 300 -#define Q_PROPERTY 301 -#define Q_OVERRIDE 302 -#define Q_CLASSINFO 303 -#define Q_ENUMS 304 -#define Q_SETS 305 +#define TQ_PROPERTY 301 +#define TQ_OVERRIDE 302 +#define TQ_CLASSINFO 303 +#define TQ_ENUMS 304 +#define TQ_SETS 305 #define READ 306 #define WRITE 307 #define STORED 308 |