summaryrefslogtreecommitdiffstats
path: root/sipgen/transform.c
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-22 03:12:38 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-22 03:12:38 -0600
commit7d27356bafd5670adcc8753ab5437b3bf8ffa4be (patch)
tree959eb3757b9dc41290c81c022e45c955573e9a59 /sipgen/transform.c
parent6c4cc3653e8dd7668295f3e659b7eb4dc571b67c (diff)
downloadsip4-tqt-7d27356bafd5670adcc8753ab5437b3bf8ffa4be.tar.gz
sip4-tqt-7d27356bafd5670adcc8753ab5437b3bf8ffa4be.zip
Initial TQt conversion
Diffstat (limited to 'sipgen/transform.c')
-rw-r--r--sipgen/transform.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/sipgen/transform.c b/sipgen/transform.c
index d24260f..8e61351 100644
--- a/sipgen/transform.c
+++ b/sipgen/transform.c
@@ -118,11 +118,11 @@ void transform(sipSpec *pt)
rev = cd;
/*
- * Mark any QObject class. This flag will ripple through all derived
+ * Mark any TQObject class. This flag will ripple through all derived
* classes when we set the hierarchy.
*/
- if (strcmp(classBaseName(cd), "QObject") == 0)
- setIsQObjectSubClass(cd);
+ if (strcmp(classBaseName(cd), TQOBJECT_OBJECT_NAME_STRING) == 0)
+ setIsTQObjectSubClass(cd);
cd = next;
}
@@ -168,7 +168,7 @@ void transform(sipSpec *pt)
for (cd = pt -> classes; cd != NULL; cd = cd -> next)
if (cd -> iff -> module == NULL)
{
- fatalScopedName(classFQCName(cd));
+ fatalScopedName(classFTQCName(cd));
fatal(" has not been defined\n");
}
@@ -494,7 +494,7 @@ static void checkAssignmentHelper(sipSpec *pt, classDef *cd)
ctorDef *ct;
/*
- * We register types with Qt if the class is not abstract, doesn't have a
+ * We register types with TQt if the class is not abstract, doesn't have a
* private assignment operator, has a public default ctor, a public copy
* ctor and a public dtor.
*/
@@ -672,11 +672,11 @@ static void moveClassCasts(sipSpec *pt, moduleDef *mod, classDef *cd)
if (sameSignature(&(*ctp)->pysig, &ct->pysig, FALSE))
{
fatal("operator ");
- fatalScopedName(classFQCName(dcd));
+ fatalScopedName(classFTQCName(dcd));
fatal("::");
- fatalScopedName(classFQCName(dcd));
+ fatalScopedName(classFTQCName(dcd));
fatal("(");
- fatalScopedName(classFQCName(cd));
+ fatalScopedName(classFTQCName(cd));
fatal(") already defined\n");
}
@@ -902,7 +902,7 @@ static void moveGlobalSlot(sipSpec *pt, moduleDef *mod, memberDef *gmd)
/*
* Return an alternative class implementation of a mapped type if there is
* one. Note that we cheat as we assume there is one going to be one (as
- * there will be in PyQt at the moment).
+ * there will be in PyTQt at the moment).
*/
static classDef *findAltClassImplementation(sipSpec *pt, mappedTypeDef *mtd)
{
@@ -1083,7 +1083,7 @@ static void filterModuleVirtualHandlers(moduleDef *mod)
/*
- * Add an overload that is automatically generated (typically by Qt's moc).
+ * Add an overload that is automatically generated (typically by TQt's tqmoc).
*/
static void addAutoOverload(sipSpec *pt,classDef *autocd,overDef *autood)
{
@@ -1180,9 +1180,9 @@ static void setHierarchy(sipSpec *pt, classDef *base, classDef *cd,
if (cl->cd->mro != NULL && hierBeingSet(cl->cd->mro))
{
fatal("Recursive class hierarchy detected: ");
- fatalScopedName(classFQCName(cd));
+ fatalScopedName(classFTQCName(cd));
fatal(" and ");
- fatalScopedName(classFQCName(cl->cd));
+ fatalScopedName(classFTQCName(cl->cd));
fatal("\n");
}
@@ -1198,11 +1198,11 @@ static void setHierarchy(sipSpec *pt, classDef *base, classDef *cd,
setIsDeprecatedClass(cd);
/*
- * If the super-class is a QObject sub-class then this one is
+ * If the super-class is a TQObject sub-class then this one is
* as well.
*/
- if (isQObjectSubClass(mro->cd))
- setIsQObjectSubClass(cd);
+ if (isTQObjectSubClass(mro->cd))
+ setIsTQObjectSubClass(cd);
/*
* If the super-class can't be assigned to then this one
@@ -1380,7 +1380,7 @@ static void transformCtors(sipSpec *pt, classDef *cd)
for (prev = cd->ctors; prev != ct; prev = prev->next)
if (samePythonSignature(&prev->pysig, &ct->pysig))
{
- fatalScopedName(classFQCName(cd));
+ fatalScopedName(classFTQCName(cd));
fatal(" has ctors with the same Python signature\n");
}
@@ -1412,7 +1412,7 @@ static void transformCasts(sipSpec *pt, classDef *cd)
if (dcd == NULL)
{
- fatalScopedName(classFQCName(cd));
+ fatalScopedName(classFTQCName(cd));
fatal(" operator cast must be to a class\n");
}
}
@@ -1632,7 +1632,7 @@ static void getVisibleMembers(sipSpec *pt, classDef *cd)
if (!generatingCodeForModule(pt, cd->iff->module))
continue;
- if (isProtected(od) || (isSignal(od) && pluginPyQt3(pt)))
+ if (isProtected(od) || (isSignal(od) && pluginPyTQt3(pt)))
setIsUsedName(md->pyname);
/* Make we have any API name. */
@@ -1835,7 +1835,7 @@ static void resolveCtorTypes(sipSpec *pt,classDef *scope,ctorDef *ct)
if (!supportedType(scope,NULL,ad,FALSE) && (ct -> cppsig == &ct -> pysig || ct -> methodcode == NULL))
{
- fatalScopedName(classFQCName(scope));
+ fatalScopedName(classFTQCName(scope));
fatal(" unsupported ctor argument type - provide %%MethodCode and a C++ signature\n");
}
@@ -1911,7 +1911,7 @@ static void resolvePySigTypes(sipSpec *pt, moduleDef *mod, classDef *scope,
{
if (scope != NULL)
{
- fatalScopedName(classFQCName(scope));
+ fatalScopedName(classFTQCName(scope));
fatal("::");
}
@@ -1925,7 +1925,7 @@ static void resolvePySigTypes(sipSpec *pt, moduleDef *mod, classDef *scope,
{
if (scope != NULL)
{
- fatalScopedName(classFQCName(scope));
+ fatalScopedName(classFTQCName(scope));
fatal("::");
}
@@ -1952,7 +1952,7 @@ static void resolvePySigTypes(sipSpec *pt, moduleDef *mod, classDef *scope,
{
if (scope != NULL)
{
- fatalScopedName(classFQCName(scope));
+ fatalScopedName(classFTQCName(scope));
fatal("::");
}
@@ -1963,7 +1963,7 @@ static void resolvePySigTypes(sipSpec *pt, moduleDef *mod, classDef *scope,
{
if (scope != NULL)
{
- fatalScopedName(classFQCName(scope));
+ fatalScopedName(classFTQCName(scope));
fatal("::");
}
@@ -2265,7 +2265,7 @@ static void ensureInput(classDef *cd,overDef *od,argDef *ad)
{
if (cd != NULL)
{
- fatalScopedName(classFQCName(cd));
+ fatalScopedName(classFTQCName(cd));
fatal("::");
}
@@ -2995,7 +2995,7 @@ static void searchClassScope(sipSpec *pt, classDef *c_scope,
continue;
/* Append the name to the scope and see if it exists. */
- tmpsnd = copyScopedName(classFQCName(mro->cd));
+ tmpsnd = copyScopedName(classFTQCName(mro->cd));
appendScopedName(&tmpsnd, copyScopedName(snd));
searchMappedTypes(pt, mro->cd->iff->module, tmpsnd, ad);
@@ -3155,7 +3155,7 @@ static void searchClasses(sipSpec *pt, moduleDef *context,
if (isExternal(cd) && cd->iff->module != context)
continue;
- if (compareScopedNames(classFQCName(cd), cname) == 0)
+ if (compareScopedNames(classFTQCName(cd), cname) == 0)
{
ad->atype = class_type;
ad->u.cd = cd;
@@ -3404,8 +3404,8 @@ static void createSortedNumberedTypesTable(sipSpec *pt, moduleDef *mod)
case class_type:
ad->u.cd->iff->ifacenr = i;
- /* If we find a class called QObject, assume it's Qt. */
- if (strcmp(ad->name->text, "QObject") == 0)
+ /* If we find a class called TQObject, assume it's TQt. */
+ if (strcmp(ad->name->text, TQOBJECT_OBJECT_NAME_STRING) == 0)
mod->qobjclass = i;
break;