From 7d27356bafd5670adcc8753ab5437b3bf8ffa4be Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 22 Nov 2011 03:12:38 -0600 Subject: Initial TQt conversion --- sipgen/parser.c | 62 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'sipgen/parser.c') diff --git a/sipgen/parser.c b/sipgen/parser.c index 5c51d1d..cf30191 100644 --- a/sipgen/parser.c +++ b/sipgen/parser.c @@ -93,8 +93,8 @@ static int sectionFlags; /* The current section flags. */ static int currentOverIsVirt; /* Set if the overload is virtual. */ static int currentCtorIsExplicit; /* Set if the ctor is explicit. */ static int currentIsStatic; /* Set if the current is static. */ -static int currentIsSignal; /* Set if the current is Q_SIGNAL. */ -static int currentIsSlot; /* Set if the current is Q_SLOT. */ +static int currentIsSignal; /* Set if the current is TQ_SIGNAL. */ +static int currentIsSlot; /* Set if the current is TQ_SLOT. */ static int currentIsTemplate; /* Set if the current is a template. */ static char *previousFile; /* The file just parsed. */ static parserContext currentContext; /* The current context. */ @@ -307,9 +307,9 @@ static int isEnabledFeature(const char *name); TK_LOGICAL_OR = 337, TK_CONST = 338, TK_STATIC = 339, - TK_SIPSIGNAL = 340, - TK_SIPSLOT = 341, - TK_SIPANYSLOT = 342, + TK_SIPTQT_SIGNAL = 340, + TK_SIPTQT_SLOT = 341, + TK_SIPANYTQT_SLOT = 342, TK_SIPRXCON = 343, TK_SIPRXDIS = 344, TK_SIPSLOTCON = 345, @@ -322,13 +322,13 @@ static int isEnabledFeature(const char *name); TK_PLATFORMS = 352, TK_FEATURE = 353, TK_LICENSE = 354, - TK_QCHAR = 355, + TK_TQCHAR = 355, TK_TRUE = 356, TK_FALSE = 357, TK_NULL = 358, TK_OPERATOR = 359, TK_THROW = 360, - TK_QOBJECT = 361, + TK_TQOBJECT = 361, TK_EXCEPTION = 362, TK_RAISECODE = 363, TK_EXPLICIT = 364, @@ -421,9 +421,9 @@ static int isEnabledFeature(const char *name); #define TK_LOGICAL_OR 337 #define TK_CONST 338 #define TK_STATIC 339 -#define TK_SIPSIGNAL 340 -#define TK_SIPSLOT 341 -#define TK_SIPANYSLOT 342 +#define TK_SIPTQT_SIGNAL 340 +#define TK_SIPTQT_SLOT 341 +#define TK_SIPANYTQT_SLOT 342 #define TK_SIPRXCON 343 #define TK_SIPRXDIS 344 #define TK_SIPSLOTCON 345 @@ -436,13 +436,13 @@ static int isEnabledFeature(const char *name); #define TK_PLATFORMS 352 #define TK_FEATURE 353 #define TK_LICENSE 354 -#define TK_QCHAR 355 +#define TK_TQCHAR 355 #define TK_TRUE 356 #define TK_FALSE 357 #define TK_NULL 358 #define TK_OPERATOR 359 #define TK_THROW 360 -#define TK_QOBJECT 361 +#define TK_TQOBJECT 361 #define TK_EXCEPTION 362 #define TK_RAISECODE 363 #define TK_EXPLICIT 364 @@ -997,8 +997,8 @@ static const char *const yytname[] = "TK_STATIC", "TK_SIPSIGNAL", "TK_SIPSLOT", "TK_SIPANYSLOT", "TK_SIPRXCON", "TK_SIPRXDIS", "TK_SIPSLOTCON", "TK_SIPSLOTDIS", "TK_NUMBER", "TK_REAL", "TK_TYPEDEF", "TK_NAMESPACE", "TK_TIMELINE", - "TK_PLATFORMS", "TK_FEATURE", "TK_LICENSE", "TK_QCHAR", "TK_TRUE", - "TK_FALSE", "TK_NULL", "TK_OPERATOR", "TK_THROW", "TK_QOBJECT", + "TK_PLATFORMS", "TK_FEATURE", "TK_LICENSE", "TK_TQCHAR", "TK_TRUE", + "TK_FALSE", "TK_NULL", "TK_OPERATOR", "TK_THROW", "TK_TQOBJECT", "TK_EXCEPTION", "TK_RAISECODE", "TK_EXPLICIT", "TK_TEMPLATE", "TK_ELLIPSIS", "TK_DEFMETATYPE", "TK_DEFSUPERTYPE", "'{'", "'}'", "';'", "'('", "')'", "'!'", "'-'", "','", "'='", "'+'", "'*'", "'/'", "'&'", @@ -3530,7 +3530,7 @@ yyreduce: /* * This is a no-op and is retained for compatibility * until the last use of it (by SIP v3) can be removed - * from PyQt. + * from PyTQt. */ } break; @@ -6851,11 +6851,11 @@ static void finishClass(sipSpec *pt, moduleDef *mod, classDef *cd, if ((flg = findOptFlag(of, "Supertype", dotted_name_flag)) != NULL) cd->supertype = cacheName(pt, flg->fvalue.sval); - if ((flg = findOptFlag(of, "PyQt4Flags", integer_flag)) != NULL) + if ((flg = findOptFlag(of, "PyTQt4Flags", integer_flag)) != NULL) cd->pyqt4_flags = flg->fvalue.ival; - if (findOptFlag(of, "PyQt4NoQMetaObject", bool_flag) != NULL) - setPyQt4NoQMetaObject(cd); + if (findOptFlag(of, "PyTQt4NoTQMetaObject", bool_flag) != NULL) + setPyTQt4NoTQMetaObject(cd); if (isOpaque(cd)) { @@ -7548,7 +7548,7 @@ static void instantiateClassTemplate(sipSpec *pt, moduleDef *mod, ifaceFileList *iffl, **used; type_names = type_values = NULL; - appendTypeStrings(classFQCName(tcd->cd), &tcd->sig, &td->types, NULL, &type_names, &type_values); + appendTypeStrings(classFTQCName(tcd->cd), &tcd->sig, &td->types, NULL, &type_names, &type_values); /* * Add a mapping from the template name to the instantiated name. If we @@ -7557,9 +7557,9 @@ static void instantiateClassTemplate(sipSpec *pt, moduleDef *mod, ad = &tcd->sig.args[tcd->sig.nrArgs++]; memset(ad, 0, sizeof (argDef)); ad->atype = defined_type; - ad->u.snd = classFQCName(tcd->cd); + ad->u.snd = classFTQCName(tcd->cd); - appendScopedName(&type_names, text2scopePart(scopedNameTail(classFQCName(tcd->cd)))); + appendScopedName(&type_names, text2scopePart(scopedNameTail(classFTQCName(tcd->cd)))); appendScopedName(&type_values, text2scopePart(scopedNameToString(fqname))); /* Create the new class. */ @@ -7949,7 +7949,7 @@ static void templateType(argDef *ad, classTmplDef *tcd, templateDef *td, classDe } /* Handle the class name itself. */ - if (strcmp(name, scopedNameTail(classFQCName(tcd->cd))) == 0) + if (strcmp(name, scopedNameTail(classFTQCName(tcd->cd))) == 0) { ad->atype = class_type; ad->u.cd = ncd; @@ -8174,7 +8174,7 @@ static int foundInScope(scopedNameDef *fq_name, scopedNameDef *rel_name) scopedNameDef *snd; int found; - snd = copyScopedName(classFQCName(scope)); + snd = copyScopedName(classFTQCName(scope)); appendScopedName(&snd, copyScopedName(rel_name)); found = (compareScopedNames(fq_name, snd) == 0); @@ -8594,7 +8594,7 @@ static void newFunction(sipSpec *pt, moduleDef *mod, classDef *c_scope, if (isvirt) { - if (isSignal(od) && pluginPyQt3(pt)) + if (isSignal(od) && pluginPyTQt3(pt)) yyerror("Virtual signals aren't supported"); setIsVirtual(od); @@ -8821,7 +8821,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *c_scope, int nrargs; /* Nr. of arguments. */ } slot_table[] = { {"__str__", str_slot, TRUE, 0}, - {"__unicode__", unicode_slot, TRUE, 0}, + {"__tqunicode__", tqunicode_slot, TRUE, 0}, {"__int__", int_slot, FALSE, 0}, {"__long__", long_slot, FALSE, 0}, {"__float__", float_slot, FALSE, 0}, @@ -9649,20 +9649,20 @@ static const char *getDocValue(optFlags *optflgs) /* - * Return TRUE if the PyQt3 plugin was specified. + * Return TRUE if the PyTQt3 plugin was specified. */ -int pluginPyQt3(sipSpec *pt) +int pluginPyTQt3(sipSpec *pt) { - return stringFind(pt->plugins, "PyQt3"); + return stringFind(pt->plugins, "PyTQt3"); } /* - * Return TRUE if the PyQt4 plugin was specified. + * Return TRUE if the PyTQt4 plugin was specified. */ -int pluginPyQt4(sipSpec *pt) +int pluginPyTQt4(sipSpec *pt) { - return stringFind(pt->plugins, "PyQt4"); + return stringFind(pt->plugins, "PyTQt4"); } -- cgit v1.2.1