diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-22 03:12:38 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-22 03:12:38 -0600 |
commit | 7d27356bafd5670adcc8753ab5437b3bf8ffa4be (patch) | |
tree | 959eb3757b9dc41290c81c022e45c955573e9a59 /sipgen/gencode.c | |
parent | 6c4cc3653e8dd7668295f3e659b7eb4dc571b67c (diff) | |
download | sip4-tqt-7d27356bafd5670adcc8753ab5437b3bf8ffa4be.tar.gz sip4-tqt-7d27356bafd5670adcc8753ab5437b3bf8ffa4be.zip |
Initial TQt conversion
Diffstat (limited to 'sipgen/gencode.c')
-rw-r--r-- | sipgen/gencode.c | 394 |
1 files changed, 197 insertions, 197 deletions
diff --git a/sipgen/gencode.c b/sipgen/gencode.c index b0c3d01..bd9fc11 100644 --- a/sipgen/gencode.c +++ b/sipgen/gencode.c @@ -500,10 +500,10 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod, , mname , mname); - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) prcode(fp, "\n" -"#include <QMetaType>\n" +"#include <TQMetaType>\n" ); /* Define the enabled features. */ @@ -639,8 +639,8 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod, "#define sipString_AsLatin1String sipAPI_%s->api_string_as_latin1_string\n" "#define sipString_AsUTF8Char sipAPI_%s->api_string_as_utf8_char\n" "#define sipString_AsUTF8String sipAPI_%s->api_string_as_utf8_string\n" -"#define sipUnicode_AsWChar sipAPI_%s->api_unicode_as_wchar\n" -"#define sipUnicode_AsWString sipAPI_%s->api_unicode_as_wstring\n" +"#define sipUnicode_AsWChar sipAPI_%s->api_tqunicode_as_wchar\n" +"#define sipUnicode_AsWString sipAPI_%s->api_tqunicode_as_wstring\n" "#define sipConvertFromConstVoidPtr sipAPI_%s->api_convert_from_const_void_ptr\n" "#define sipConvertFromVoidPtrAndSize sipAPI_%s->api_convert_from_void_ptr_and_size\n" "#define sipConvertFromConstVoidPtrAndSize sipAPI_%s->api_convert_from_const_void_ptr_and_size\n" @@ -802,13 +802,13 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod, , mname, mld->module->name); } - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) prcode(fp, "\n" -"typedef const QMetaObject *(*sip_qt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n" +"typedef const TQMetaObject *(*sip_qt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n" "extern sip_qt_metaobject_func sip_%s_qt_metaobject;\n" "\n" -"typedef int (*sip_qt_metacall_func)(sipSimpleWrapper *,sipTypeDef *,QMetaObject::Call,int,void **);\n" +"typedef int (*sip_qt_metacall_func)(sipSimpleWrapper *,sipTypeDef *,TQMetaObject::Call,int,void **);\n" "extern sip_qt_metacall_func sip_%s_qt_metacall;\n" "\n" "typedef int (*sip_qt_metacast_func)(sipSimpleWrapper *,sipTypeDef *,const char *);\n" @@ -873,7 +873,7 @@ static void generateCompositeCpp(sipSpec *pt, const char *codeDir) "\n" " /*\n" " * Note that we don't complain if the module can't be imported. This\n" -" * is a favour to Linux distro packagers who like to split PyQt into\n" +" * is a favour to Linux distro packagers who like to split PyTQt into\n" " * different sub-packages.\n" " */\n" " if (mod)\n" @@ -1199,23 +1199,23 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir, /* * Include the library headers for types used by virtual handlers, module - * level functions, module level variables and Qt meta types. + * level functions, module level variables and TQt meta types. */ generateUsedIncludes(mod->used, fp); /* - * If there should be a Qt support API then generate stubs values for the + * If there should be a TQt support API then generate stubs values for the * optional parts. These should be undefined in %ModuleCode if a C++ * implementation is provided. */ if (mod->qobjclass >= 0) prcode(fp, "\n" -"#define sipQtCreateUniversalSignal 0\n" -"#define sipQtFindUniversalSignal 0\n" -"#define sipQtEmitSignal 0\n" -"#define sipQtConnectPySignal 0\n" -"#define sipQtDisconnectPySignal 0\n" +"#define sipTQtCreateUniversalSignal 0\n" +"#define sipTQtFindUniversalSignal 0\n" +"#define sipTQtEmitSignal 0\n" +"#define sipTQtConnectPySignal 0\n" +"#define sipTQtDisconnectPySignal 0\n" ); /* Define the names. */ @@ -1394,7 +1394,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir, prcode(fp, " {%d, \"", cd->iff->ifacenr); - prScopedName(fp, classFQCName(cd), "."); + prScopedName(fp, classFTQCName(cd), "."); prcode(fp,"\"},\n" ); } @@ -1620,7 +1620,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir, continue; prcode(fp, -" {sipSubClass_%C, ",classFQCName(cd)); +" {sipSubClass_%C, ",classFTQCName(cd)); generateEncodedType(mod, cd->subbase, 0, fp); @@ -1787,27 +1787,27 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir, "};\n" ); - /* Generate any Qt support API. */ + /* Generate any TQt support API. */ if (mod->qobjclass >= 0) prcode(fp, "\n" "\n" -"/* This defines the Qt support API. */\n" +"/* This defines the TQt support API. */\n" "\n" -"static sipQtAPI qtAPI = {\n" +"static sipTQtAPI qtAPI = {\n" " &typesTable[%d],\n" -" sipQtCreateUniversalSignal,\n" -" sipQtFindUniversalSignal,\n" -" sipQtCreateUniversalSlot,\n" -" sipQtDestroyUniversalSlot,\n" -" sipQtFindSlot,\n" -" sipQtConnect,\n" -" sipQtDisconnect,\n" -" sipQtSameSignalSlotName,\n" -" sipQtFindSipslot,\n" -" sipQtEmitSignal,\n" -" sipQtConnectPySignal,\n" -" sipQtDisconnectPySignal\n" +" sipTQtCreateUniversalSignal,\n" +" sipTQtFindUniversalSignal,\n" +" sipTQtCreateUniversalSlot,\n" +" sipTQtDestroyUniversalSlot,\n" +" sipTQtFindSlot,\n" +" sipTQtConnect,\n" +" sipTQtDisconnect,\n" +" sipTQtSameSignalSlotName,\n" +" sipTQtFindSipslot,\n" +" sipTQtEmitSignal,\n" +" sipTQtConnectPySignal,\n" +" sipTQtDisconnectPySignal\n" "};\n" , mod->qobjclass); @@ -1889,7 +1889,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir, "const sipExportedModuleDef *sipModuleAPI_%s_%s;\n" , mname, mld->module->name); - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) prcode(fp, "\n" "sip_qt_metaobject_func sip_%s_qt_metaobject;\n" @@ -2016,7 +2016,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir, " }\n" , mname); - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) { /* Import the helpers. */ prcode(fp, @@ -2161,7 +2161,7 @@ static void generateTypesTable(sipSpec *pt, moduleDef *mod, FILE *fp) argDef *ad; const char *type_suffix; - type_suffix = (pluginPyQt4(pt) || pluginPyQt3(pt)) ? ".super" : ""; + type_suffix = (pluginPyTQt4(pt) || pluginPyTQt3(pt)) ? ".super" : ""; prcode(fp, "\n" @@ -2389,7 +2389,7 @@ static int generateSubClassConvertors(sipSpec *pt, moduleDef *mod, FILE *fp) if (!generating_c) prcode(fp, "extern \"C\" {static const sipTypeDef *sipSubClass_%C(void **);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); /* Allow the deprecated use of sipClass rather than sipType. */ needs_sipClass = usedInCode(cd->convtosubcode, "sipClass"); @@ -2398,8 +2398,8 @@ static int generateSubClassConvertors(sipSpec *pt, moduleDef *mod, FILE *fp) "static const sipTypeDef *sipSubClass_%C(void **sipCppRet)\n" "{\n" " %S *sipCpp = reinterpret_cast<%S *>(*sipCppRet);\n" - , classFQCName(cd) - , classFQCName(cd->subbase), classFQCName(cd->subbase)); + , classFTQCName(cd) + , classFTQCName(cd->subbase), classFTQCName(cd->subbase)); if (needs_sipClass) prcode(fp, @@ -2740,11 +2740,11 @@ static int generateEnumMemberTable(sipSpec *pt, moduleDef *mod, classDef *cd, if (cd != NULL) { if (isProtectedEnum(emd->ed)) - prcode(fp, "sip%C::", classFQCName(cd)); + prcode(fp, "sip%C::", classFTQCName(cd)); else if (isProtectedClass(cd)) prcode(fp, "%U::", cd); else - prcode(fp, "%S::", classFQCName(cd)); + prcode(fp, "%S::", classFTQCName(cd)); } else if (mtd != NULL) { @@ -2859,7 +2859,7 @@ static void generateTypesInline(sipSpec *pt, moduleDef *mod, FILE *fp) if (vd->ecd == NULL) prcode(fp, "sipModuleDict"); else - prcode(fp, "(PyObject *)sipTypeAsPyTypeObject(sipType_%C)", classFQCName(vd->ecd)); + prcode(fp, "(PyObject *)sipTypeAsPyTypeObject(sipType_%C)", classFTQCName(vd->ecd)); prcode(fp, ",%N,", vd->pyname); @@ -2870,7 +2870,7 @@ static void generateTypesInline(sipSpec *pt, moduleDef *mod, FILE *fp) if (vd->type.atype == class_type) prcode(fp, ",sipType_%C);\n" - , classFQCName(vd->type.u.cd)); + , classFTQCName(vd->type.u.cd)); else if (vd->type.atype == enum_type) prcode(fp, ",sipType_%C);\n" , vd->type.u.ed->fqcname); @@ -2921,7 +2921,7 @@ static int generateClasses(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp) "\n" "/* Define the class and enum instances to be added to this type dictionary. */\n" "static sipTypeInstanceDef typeInstances_%C[] = {\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, "\n" @@ -2938,7 +2938,7 @@ static int generateClasses(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp) if (vd->type.atype == class_type) { - scopedNameDef *vcname = classFQCName(vd->type.u.cd); + scopedNameDef *vcname = classFTQCName(vd->type.u.cd); if (vd->accessfunc != NULL) { @@ -3007,7 +3007,7 @@ static int generateVoidPointers(sipSpec *pt, moduleDef *mod, classDef *cd, "\n" "/* Define the void pointers to be added to this type dictionary. */\n" "static sipVoidPtrInstanceDef voidPtrInstances_%C[] = {\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, "\n" @@ -3071,7 +3071,7 @@ static int generateChars(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp) "\n" "/* Define the chars to be added to this type dictionary. */\n" "static sipCharInstanceDef charInstances_%C[] = {\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, "\n" @@ -3130,7 +3130,7 @@ static int generateStrings(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp) "\n" "/* Define the strings to be added to this type dictionary. */\n" "static sipStringInstanceDef stringInstances_%C[] = {\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, "\n" @@ -3247,7 +3247,7 @@ static void ints_intro(classDef *cd, FILE *fp) "\n" "/* Define the ints to be added to this type dictionary. */\n" "static sipIntInstanceDef intInstances_%C[] = {\n" - ,classFQCName(cd)); + ,classFTQCName(cd)); else prcode(fp, "\n" @@ -3336,7 +3336,7 @@ static int generateVariableType(sipSpec *pt, moduleDef *mod, classDef *cd, "/* Define the %ss to be added to this type dictionary. */\n" "static sip%sInstanceDef %sInstances_%C[] = {\n" , eng - , s1, s2, classFQCName(cd)); + , s1, s2, classFTQCName(cd)); else prcode(fp, "\n" @@ -3396,7 +3396,7 @@ static int generateDoubles(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp) "\n" "/* Define the doubles to be added to this type dictionary. */\n" "static sipDoubleInstanceDef doubleInstances_%C[] = {\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, "\n" @@ -3813,7 +3813,7 @@ static void generateTypeDefLink(sipSpec *pt, ifaceFileDef *iff, FILE *fp) if (iff->next_alt->type == mappedtype_iface) prcode(fp, ".mtd_base"); - else if (pluginPyQt3(pt) || pluginPyQt4(pt)) + else if (pluginPyTQt3(pt) || pluginPyTQt4(pt)) prcode(fp, ".super.ctd_base"); else prcode(fp, ".ctd_base"); @@ -4230,11 +4230,11 @@ static void generateVariableGetter(ifaceFileDef *scope, varDef *vd, FILE *fp) if (generating_c) prcode(fp, " %S *sipCpp = (%S *)sipSelf;\n" - , classFQCName(vd->ecd), classFQCName(vd->ecd)); + , classFTQCName(vd->ecd), classFTQCName(vd->ecd)); else prcode(fp, " %S *sipCpp = reinterpret_cast<%S *>(sipSelf);\n" - , classFQCName(vd->ecd), classFQCName(vd->ecd)); + , classFTQCName(vd->ecd), classFTQCName(vd->ecd)); prcode(fp, "\n" @@ -4559,11 +4559,11 @@ static void generateVariableSetter(ifaceFileDef *scope, varDef *vd, FILE *fp) if (generating_c) prcode(fp, " %S *sipCpp = (%S *)sipSelf;\n" - , classFQCName(vd->ecd), classFQCName(vd->ecd)); + , classFTQCName(vd->ecd), classFTQCName(vd->ecd)); else prcode(fp, " %S *sipCpp = reinterpret_cast<%S *>(sipSelf);\n" - , classFQCName(vd->ecd), classFQCName(vd->ecd)); + , classFTQCName(vd->ecd), classFTQCName(vd->ecd)); prcode(fp, "\n" @@ -4656,7 +4656,7 @@ static void generateVariableSetter(ifaceFileDef *scope, varDef *vd, FILE *fp) prcode(fp, "\n" " sipReleaseType(sipVal, sipType_%C, sipValState);\n" - , classFQCName(vd->type.u.cd)); + , classFTQCName(vd->type.u.cd)); else if (vd->type.atype == mapped_type && vd->type.nrderefs == 0 && !noRelease(vd->type.u.mtd)) prcode(fp, "\n" @@ -4702,7 +4702,7 @@ static void generateVariableSetter(ifaceFileDef *scope, varDef *vd, FILE *fp) static void generateVarMember(varDef *vd, FILE *fp) { if (isStaticVar(vd)) - prcode(fp,"%S::",classFQCName(vd->ecd)); + prcode(fp,"%S::",classFTQCName(vd->ecd)); else prcode(fp,"sipCpp->"); @@ -4772,7 +4772,7 @@ static int generateObjToCppConversion(argDef *ad,FILE *fp) * all types). */ - prcode(fp, "sipForceConvertToType(sipPy,sipType_%C,NULL,%s,%s,&sipIsErr)", classFQCName(ad->u.cd), (ad->nrderefs ? "0" : "SIP_NOT_NONE"), (might_be_temp ? "&sipValState" : "NULL")); + prcode(fp, "sipForceConvertToType(sipPy,sipType_%C,NULL,%s,%s,&sipIsErr)", classFTQCName(ad->u.cd), (ad->nrderefs ? "0" : "SIP_NOT_NONE"), (might_be_temp ? "&sipValState" : "NULL")); prcode(fp, "%s;\n" , tail); @@ -5078,7 +5078,7 @@ static void generateSlot(moduleDef *mod, classDef *cd, enumDef *ed, { prefix = "Type"; pyname = cd->pyname; - fqcname = classFQCName(cd); + fqcname = classFTQCName(cd); overs = cd->overs; } else @@ -5335,7 +5335,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, for (md = cd->members; md != NULL; md = md->next) if (cd->iff->type == namespace_iface) generateOrdinaryFunction(pt, mod, cd, NULL, md, fp); - else if (md->slot != no_slot && md->slot != unicode_slot) + else if (md->slot != no_slot && md->slot != tqunicode_slot) generateSlot(mod, cd, NULL, md, fp); if (cd->iff->type != namespace_iface && !generating_c) @@ -5363,7 +5363,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, prcode(fp, " if (targetType == sipType_%C)\n" " return ptr;\n" - ,classFQCName(cd)); + ,classFTQCName(cd)); for (cl = cd->supers; cl != NULL; cl = cl->next) { @@ -5373,7 +5373,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, "\n" " if ((res = ((const sipClassTypeDef *)sipType_%C)->ctd_cast((%S *)(%S *)ptr,targetType)) != NULL)\n" " return res;\n" - ,sname,sname,classFQCName(cd)); + ,sname,sname,classFTQCName(cd)); } prcode(fp, @@ -5454,7 +5454,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, prcode(fp, " if (sipState & SIP_DERIVED_CLASS)\n" " delete reinterpret_cast<sip%C *>(sipCppV);\n" - , classFQCName(cd)); + , classFTQCName(cd)); if (isPublicDtor(cd)) prcode(fp, @@ -5490,12 +5490,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static int traverse_%C(void *, visitproc, void *);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static int traverse_%C(void *sipCppV,visitproc sipVisit,void *sipArg)\n" "{\n" -" ", classFQCName(cd)); +" ", classFTQCName(cd)); generateClassFromVoid(cd, "sipCpp", "sipCppV", fp); @@ -5524,12 +5524,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static int clear_%C(void *);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static int clear_%C(void *sipCppV)\n" "{\n" -" ", classFQCName(cd)); +" ", classFTQCName(cd)); generateClassFromVoid(cd, "sipCpp", "sipCppV", fp); @@ -5561,12 +5561,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static int getbuffer_%C(PyObject *, void *, Py_buffer *, int);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static int getbuffer_%C(PyObject *%s, void *%s, Py_buffer *sipBuffer, int %s)\n" "{\n" - , classFQCName(cd), argName("sipSelf", cd->getbufcode), (generating_c || need_cpp ? "sipCppV" : ""), argName("sipFlags", cd->getbufcode)); + , classFTQCName(cd), argName("sipSelf", cd->getbufcode), (generating_c || need_cpp ? "sipCppV" : ""), argName("sipFlags", cd->getbufcode)); if (need_cpp) { @@ -5602,12 +5602,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static void releasebuffer_%C(PyObject *, void *, Py_buffer *);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static void releasebuffer_%C(PyObject *%s, void *sipCppV, Py_buffer *)\n" "{\n" -" ", classFQCName(cd) +" ", classFTQCName(cd) , argName("sipSelf", cd->releasebufcode)); generateClassFromVoid(cd, "sipCpp", "sipCppV", fp); @@ -5635,12 +5635,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static SIP_SSIZE_T getreadbuffer_%C(PyObject *, void *, SIP_SSIZE_T, void **);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static SIP_SSIZE_T getreadbuffer_%C(PyObject *%s, void *sipCppV, SIP_SSIZE_T %s, void **%s)\n" "{\n" -" ", classFQCName(cd) +" ", classFTQCName(cd) , argName("sipSelf", cd->readbufcode) , argName("sipSegment", cd->readbufcode) , argName("sipPtrPtr", cd->readbufcode)); @@ -5673,12 +5673,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static SIP_SSIZE_T getwritebuffer_%C(PyObject *, void *, SIP_SSIZE_T, void **);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static SIP_SSIZE_T getwritebuffer_%C(PyObject *%s, void *sipCppV, SIP_SSIZE_T %s, void **%s)\n" "{\n" -" ", classFQCName(cd) +" ", classFTQCName(cd) , argName("sipSelf", cd->writebufcode) , argName("sipSegment", cd->writebufcode) , argName("sipPtrPtr", cd->writebufcode)); @@ -5711,12 +5711,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static SIP_SSIZE_T getsegcount_%C(PyObject *, void *, SIP_SSIZE_T *);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static SIP_SSIZE_T getsegcount_%C(PyObject *%s, void *sipCppV, SIP_SSIZE_T *%s)\n" "{\n" -" ", classFQCName(cd) +" ", classFTQCName(cd) , argName("sipSelf", cd->segcountcode) , argName("sipLenPtr", cd->segcountcode)); @@ -5748,12 +5748,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static SIP_SSIZE_T getcharbuffer_%C(PyObject *, void *, SIP_SSIZE_T, void **);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static SIP_SSIZE_T getcharbuffer_%C(PyObject *%s, void *sipCppV, SIP_SSIZE_T %s, void **%s)\n" "{\n" -" ", classFQCName(cd) +" ", classFTQCName(cd) , argName("sipSelf", cd->charbufcode) , argName("sipSegment", cd->charbufcode) , argName("sipPtrPtr", cd->charbufcode)); @@ -5786,12 +5786,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (!generating_c) prcode(fp, "extern \"C\" {static PyObject *pickle_%C(void *);}\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "static PyObject *pickle_%C(void *sipCppV)\n" "{\n" -" ", classFQCName(cd)); +" ", classFTQCName(cd)); generateClassFromVoid(cd, "sipCpp", "sipCppV", fp); @@ -5830,11 +5830,11 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (generating_c) prcode(fp, " ((%S *)sipDst)[sipDstIdx] = *((const %S *)sipSrc);\n" - , classFQCName(cd), classFQCName(cd)); + , classFTQCName(cd), classFTQCName(cd)); else prcode(fp, " reinterpret_cast<%S *>(sipDst)[sipDstIdx] = *reinterpret_cast<const %S *>(sipSrc);\n" - , classFQCName(cd), classFQCName(cd)); + , classFTQCName(cd), classFTQCName(cd)); prcode(fp, "}\n" @@ -5859,11 +5859,11 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, if (generating_c) prcode(fp, " return sipMalloc(sizeof (%S) * sipNrElem);\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " return new %S[sipNrElem];\n" - , classFQCName(cd)); + , classFTQCName(cd)); prcode(fp, "}\n" @@ -5891,12 +5891,12 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, " *sipPtr = ((const %S *)sipSrc)[sipSrcIdx];\n" "\n" " return sipPtr;\n" - , classFQCName(cd), classFQCName(cd) - , classFQCName(cd)); + , classFTQCName(cd), classFTQCName(cd) + , classFTQCName(cd)); else prcode(fp, " return new %S(reinterpret_cast<const %S *>(sipSrc)[sipSrcIdx]);\n" - , classFQCName(cd), classFQCName(cd)); + , classFTQCName(cd), classFTQCName(cd)); prcode(fp, "}\n" @@ -5933,7 +5933,7 @@ static void generateClassFunctions(sipSpec *pt, moduleDef *mod, classDef *cd, " if (sipIsDerived(sipSelf))\n" " reinterpret_cast<sip%C *>(sipSelf->u.cppPtr)->sipPySelf = NULL;\n" "\n" - ,classFQCName(cd)); + ,classFTQCName(cd)); if (generating_c || isPublicDtor(cd) || (hasShadow(cd) && isProtectedDtor(cd))) { @@ -6005,11 +6005,11 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd, prcode(fp, "\n" -"sip%C::sip%C(",classFQCName(cd),classFQCName(cd)); +"sip%C::sip%C(",classFTQCName(cd),classFTQCName(cd)); generateCalledArgs(cd->iff, ct->cppsig, Definition, TRUE, fp); - prcode(fp,")%X: %S(",ct->exceptions,classFQCName(cd)); + prcode(fp,")%X: %S(",ct->exceptions,classFTQCName(cd)); generateProtectedCallArgs(ct->cppsig, fp); @@ -6020,7 +6020,7 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd, if (tracing) { prcode(fp, -" sipTrace(SIP_TRACE_CTORS,\"sip%C::sip%C(",classFQCName(cd),classFQCName(cd)); +" sipTrace(SIP_TRACE_CTORS,\"sip%C::sip%C(",classFTQCName(cd),classFTQCName(cd)); generateCalledArgs(cd->iff, ct->cppsig, Declaration, TRUE, fp); prcode(fp,")%X (this=0x%%08x)\\n\",this);\n" "\n" @@ -6045,13 +6045,13 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd, "\n" "sip%C::~sip%C()%X\n" "{\n" - ,classFQCName(cd),classFQCName(cd),cd->dtorexceptions); + ,classFTQCName(cd),classFTQCName(cd),cd->dtorexceptions); if (tracing) prcode(fp, " sipTrace(SIP_TRACE_DTORS,\"sip%C::~sip%C()%X (this=0x%%08x)\\n\",this);\n" "\n" - ,classFQCName(cd),classFQCName(cd),cd->dtorexceptions); + ,classFTQCName(cd),classFTQCName(cd),cd->dtorexceptions); if (cd->dtorcode != NULL) generateCppCodeBlock(cd->dtorcode,fp); @@ -6063,21 +6063,21 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd, } /* The meta methods if required. */ - if (pluginPyQt4(pt) && isQObjectSubClass(cd)) + if (pluginPyTQt4(pt) && isTQObjectSubClass(cd)) { - if (!noPyQt4QMetaObject(cd)) + if (!noPyTQt4TQMetaObject(cd)) prcode(fp, "\n" -"const QMetaObject *sip%C::metaObject() const\n" +"const TQMetaObject *sip%C::tqmetaObject() const\n" "{\n" " return sip_%s_qt_metaobject(sipPySelf,sipType_%C);\n" "}\n" - , classFQCName(cd) - , mod->name, classFQCName(cd)); + , classFTQCName(cd) + , mod->name, classFTQCName(cd)); prcode(fp, "\n" -"int sip%C::qt_metacall(QMetaObject::Call _c,int _id,void **_a)\n" +"int sip%C::qt_metacall(TQMetaObject::Call _c,int _id,void **_a)\n" "{\n" " _id = %S::qt_metacall(_c,_id,_a);\n" "\n" @@ -6091,11 +6091,11 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd, "{\n" " return (sip_%s_qt_metacast && sip_%s_qt_metacast(sipPySelf,sipType_%C,_clname)) ? this : %S::qt_metacast(_clname);\n" "}\n" - , classFQCName(cd) - , classFQCName(cd) - , mod->name, classFQCName(cd) - , classFQCName(cd) - , mod->name, mod->name, classFQCName(cd), classFQCName(cd)); + , classFTQCName(cd) + , classFTQCName(cd) + , mod->name, classFTQCName(cd) + , classFTQCName(cd) + , mod->name, mod->name, classFTQCName(cd), classFTQCName(cd)); } /* Generate the virtual catchers. */ @@ -6129,7 +6129,7 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd, generateProtectedDefinitions(cd,fp); /* Generate the emitters if needed. */ - if (pluginPyQt3(pt)) + if (pluginPyTQt3(pt)) generateEmitters(cd, fp); } @@ -6171,15 +6171,15 @@ static void generateEmitters(classDef *cd, FILE *fp) prcode(fp, "\n" -"static pyqt3QtSignal signals_%C[] = {\n" - ,classFQCName(cd)); +"static pyqt3TQtSignal signals_%C[] = {\n" + ,classFTQCName(cd)); noIntro = FALSE; } prcode(fp, " {%N, %C_emit_%s},\n" - ,vl->m->pyname,classFQCName(cd),vl->m->pyname->text); + ,vl->m->pyname,classFTQCName(cd),vl->m->pyname->text); break; } @@ -6232,7 +6232,7 @@ static void generateProtectedEnums(sipSpec *pt,classDef *cd,FILE *fp) for (emd = ed->members; emd != NULL; emd = emd->next) { prcode(fp,"%s" -" %s = %S::%s",eol,emd->cname,classFQCName(ed->ecd),emd->cname); +" %s = %S::%s",eol,emd->cname,classFTQCName(ed->ecd),emd->cname); eol = ",\n"; } @@ -6266,7 +6266,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr, generateBaseType(cd->iff, &od->cppsig->result, TRUE, fp); - prcode(fp," sip%C::%O(",classFQCName(cd),od); + prcode(fp," sip%C::%O(",classFTQCName(cd),od); generateCalledArgs(cd->iff, od->cppsig, Definition, TRUE, fp); prcode(fp,")%s%X\n" "{\n" @@ -6278,7 +6278,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr, " sipTrace(SIP_TRACE_CATCHERS,\""); generateBaseType(cd->iff, &od->cppsig->result, TRUE, fp); - prcode(fp," sip%C::%O(",classFQCName(cd),od); + prcode(fp," sip%C::%O(",classFTQCName(cd),od); generateCalledArgs(cd->iff, od->cppsig, Declaration, TRUE, fp); prcode(fp,")%s%X (this=0x%%08x)\\n\",this);\n" "\n" @@ -6394,7 +6394,7 @@ static void generateVirtualCatcher(moduleDef *mod, classDef *cd, int virtNr, /* Check that it has an API specified. */ if (avr == NULL) { - fatalScopedName(classFQCName(cd)); + fatalScopedName(classFTQCName(cd)); fatal("::"); prOverloadName(stderr, od); fatal(" has versioned and unversioned overloads\n"); @@ -6590,7 +6590,7 @@ static void generateUnambiguousClass(classDef *cd,classDef *scope,FILE *fp) for (cl = sub->cd->supers; cl != NULL; cl = cl->next) if (cl->cd == mro->cd) { - prcode(fp,"%S",classFQCName(sub->cd)); + prcode(fp,"%S",classFTQCName(sub->cd)); return; } @@ -6604,7 +6604,7 @@ static void generateUnambiguousClass(classDef *cd,classDef *scope,FILE *fp) } /* If we got here there is nothing to worry about. */ - prcode(fp,"%S",classFQCName(scope)); + prcode(fp,"%S",classFTQCName(scope)); } @@ -6685,7 +6685,7 @@ static void generateVirtHandlerErrorReturn(argDef *res, const char *indent, } else { - fatalScopedName(classFQCName(res->u.cd)); + fatalScopedName(classFTQCName(res->u.cd)); fatal(" must have a default constructor\n"); } } @@ -6757,7 +6757,7 @@ static void generateEmitter(classDef *cd, visibleList *vl, FILE *fp) "int sip%C::sipEmit_%s(PyObject *sipArgs)\n" "{\n" " PyObject *sipParseErr = NULL;\n" - ,classFQCName(cd),pname); + ,classFTQCName(cd),pname); for (od = vl->cd->overs; od != NULL; od = od->next) { @@ -6822,7 +6822,7 @@ static void generateEmitter(classDef *cd, visibleList *vl, FILE *fp) if (!generating_c) prcode(fp, "extern \"C\" {static int %C_emit_%s(sipSimpleWrapper *, PyObject *);}\n" - , classFQCName(cd), pname); + , classFTQCName(cd), pname); prcode(fp, "static int %C_emit_%s(sipSimpleWrapper *sw,PyObject *sipArgs)\n" @@ -6831,8 +6831,8 @@ static void generateEmitter(classDef *cd, visibleList *vl, FILE *fp) "\n" " return (ptr ? ptr->sipEmit_%s(sipArgs) : -1);\n" "}\n" - ,classFQCName(cd),pname - ,classFQCName(cd),classFQCName(cd) + ,classFTQCName(cd),pname + ,classFTQCName(cd),classFTQCName(cd) ,pname); } @@ -6943,13 +6943,13 @@ static void generateProtectedDefinitions(classDef *cd,FILE *fp) if (!isStatic(od) && !isAbstract(od) && (isVirtual(od) || isVirtualReimp(od))) { - prcode(fp, " sip%C::sipProtectVirt_%s(bool sipSelfWasArg", classFQCName(cd), mname); + prcode(fp, " sip%C::sipProtectVirt_%s(bool sipSelfWasArg", classFTQCName(cd), mname); if (od->cppsig->nrArgs > 0) prcode(fp, ","); } else - prcode(fp, " sip%C::sipProtect_%s(", classFQCName(cd), mname); + prcode(fp, " sip%C::sipProtect_%s(", classFTQCName(cd), mname); generateCalledArgs(cd->iff, od->cppsig, Definition, TRUE, fp); prcode(fp,")%s\n" @@ -6985,7 +6985,7 @@ static void generateProtectedDefinitions(classDef *cd,FILE *fp) { if (isVirtual(od) || isVirtualReimp(od)) { - prcode(fp, "(sipSelfWasArg ? %S::%s(", classFQCName(vl->cd), mname); + prcode(fp, "(sipSelfWasArg ? %S::%s(", classFTQCName(vl->cd), mname); generateProtectedCallArgs(od->cppsig, fp); @@ -6993,7 +6993,7 @@ static void generateProtectedDefinitions(classDef *cd,FILE *fp) ++parens; } else - prcode(fp, "%S::", classFQCName(vl->cd)); + prcode(fp, "%S::", classFTQCName(vl->cd)); } prcode(fp,"%s(",mname); @@ -7380,7 +7380,7 @@ static void generateParseResultExtraArgs(argDef *ad, int argnr, FILE *fp) break; case class_type: - prcode(fp, ",sipType_%C", classFQCName(ad->u.cd)); + prcode(fp, ",sipType_%C", classFTQCName(ad->u.cd)); break; case pytuple_type: @@ -7804,9 +7804,9 @@ static void generateTupleBuilder(signatureDef *sd,FILE *fp) if (ad->atype == mapped_type) prcode(fp, ",sipType_%T", ad); else if (ad->atype == fake_void_type || ad->atype == class_type) - prcode(fp, ",sipType_%C", classFQCName(ad->u.cd)); + prcode(fp, ",sipType_%C", classFTQCName(ad->u.cd)); else - prcode(fp,",sipType_QObject"); + prcode(fp,",sipType_TQObject"); if (!isArray(ad)) prcode(fp, ",NULL"); @@ -7982,8 +7982,8 @@ static void generateImportedClassAPI(classDef *cd, sipSpec *pt, moduleDef *mod, prcode(fp, "#define sipType_%C sipModuleAPI_%s_%s->em_types[%d]\n" "#define sipClass_%C sipModuleAPI_%s_%s->em_types[%d]->u.td_wrapper_type\n" - , classFQCName(cd), mname, imname, cd->iff->ifacenr - , classFQCName(cd), mname, imname, cd->iff->ifacenr); + , classFTQCName(cd), mname, imname, cd->iff->ifacenr + , classFTQCName(cd), mname, imname, cd->iff->ifacenr); if (cd->iff->type == namespace_iface) prcode(fp, @@ -8010,8 +8010,8 @@ static void generateClassAPI(classDef *cd, sipSpec *pt, FILE *fp) prcode(fp, "#define sipType_%C sipModuleAPI_%s.em_types[%d]\n" "#define sipClass_%C sipModuleAPI_%s.em_types[%d]->u.td_wrapper_type\n" - , classFQCName(cd), mname, cd->iff->ifacenr - , classFQCName(cd), mname, cd->iff->ifacenr); + , classFTQCName(cd), mname, cd->iff->ifacenr + , classFTQCName(cd), mname, cd->iff->ifacenr); generateEnumMacros(pt, cd->iff->module, cd, NULL, fp); @@ -8019,9 +8019,9 @@ static void generateClassAPI(classDef *cd, sipSpec *pt, FILE *fp) { const char *type_prefix; - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) type_prefix = "pyqt4"; - else if (pluginPyQt3(pt)) + else if (pluginPyTQt3(pt)) type_prefix = "pyqt3"; else type_prefix = "sip"; @@ -8107,7 +8107,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) "class sip%C : public %S\n" "{\n" "public:\n" - ,classFQCName(cd),classFQCName(cd)); + ,classFTQCName(cd),classFTQCName(cd)); /* Define a shadow class for any protected classes we have. */ @@ -8160,7 +8160,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) continue; prcode(fp, -" sip%C(",classFQCName(cd)); +" sip%C(",classFTQCName(cd)); generateCalledArgs(cd->iff, ct->cppsig, Declaration, TRUE, fp); @@ -8173,20 +8173,20 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) if (!isPrivateDtor(cd)) prcode(fp, " %s~sip%C()%X;\n" - ,(cd->vmembers != NULL ? "virtual " : ""),classFQCName(cd),cd->dtorexceptions); + ,(cd->vmembers != NULL ? "virtual " : ""),classFTQCName(cd),cd->dtorexceptions); /* The metacall methods if required. */ - if (pluginPyQt4(pt) && isQObjectSubClass(cd)) + if (pluginPyTQt4(pt) && isTQObjectSubClass(cd)) { prcode(fp, "\n" -" int qt_metacall(QMetaObject::Call,int,void **);\n" +" int qt_metacall(TQMetaObject::Call,int,void **);\n" " void *qt_metacast(const char *);\n" ); - if (!noPyQt4QMetaObject(cd)) + if (!noPyTQt4TQMetaObject(cd)) prcode(fp, -" const QMetaObject *metaObject() const;\n" +" const TQMetaObject *tqmetaObject() const;\n" ); } @@ -8199,7 +8199,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) generateProtectedDeclarations(cd,fp); /* The public wrapper around each signal emitter. */ - if (pluginPyQt3(pt)) + if (pluginPyTQt3(pt)) { visibleList *vl; @@ -8222,7 +8222,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) prcode(fp, "\n" " /*\n" -" * There is a public method for every Qt signal that can be emitted\n" +" * There is a public method for every TQt signal that can be emitted\n" " * by this object. This function is called by Python to emit the\n" " * signal.\n" " */\n" @@ -8293,8 +8293,8 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) "private:\n" " sip%C(const sip%C &);\n" " sip%C &operator = (const sip%C &);\n" - ,classFQCName(cd),classFQCName(cd) - ,classFQCName(cd),classFQCName(cd)); + ,classFTQCName(cd),classFTQCName(cd) + ,classFTQCName(cd),classFTQCName(cd)); if ((nrVirts = countVirtuals(cd)) > 0) prcode(fp, @@ -8641,7 +8641,7 @@ static void generateNamedBaseType(ifaceFileDef *scope, argDef *ad, char *name, case rxcon_type: case rxdis_type: nr_derefs = 1; - prcode(fp, "QObject"); + prcode(fp, TQOBJECT_OBJECT_NAME_STRING); break; case mapped_type: @@ -8915,7 +8915,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) "\n" "\n" "/* Define this type's super-types. */\n" -"static sipEncodedTypeDef supers_%C[] = {", classFQCName(cd)); +"static sipEncodedTypeDef supers_%C[] = {", classFTQCName(cd)); for (cl = cd->supers; cl != NULL; cl = cl->next) { @@ -8983,10 +8983,10 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) nr_methods = generateClassMethodTable(pt, cd, fp); nr_enums = generateEnumMemberTable(pt, mod, cd, NULL, fp); - /* Generate the PyQt4 signals table. */ + /* Generate the PyTQt4 signals table. */ is_signals = FALSE; - if (pluginPyQt4(pt) && isQObjectSubClass(cd)) + if (pluginPyTQt4(pt) && isTQObjectSubClass(cd)) { /* The signals must be grouped by name. */ for (md = cd->members; md != NULL; md = md->next) @@ -9022,9 +9022,9 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) prcode(fp, "\n" "\n" -"/* Define this type's PyQt4 signals. */\n" -"static const pyqt4QtSignal pyqt4_signals_%C[] = {\n" - , classFQCName(cd)); +"/* Define this type's PyTQt4 signals. */\n" +"static const pyqt4TQtSignal pyqt4_signals_%C[] = {\n" + , classFTQCName(cd)); } /* @@ -9132,12 +9132,12 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) has_docstring = TRUE; } - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) { type_prefix = "pyqt4"; embedded = TRUE; } - else if (pluginPyQt3(pt)) + else if (pluginPyTQt3(pt)) { type_prefix = "pyqt3"; embedded = TRUE; @@ -9264,52 +9264,52 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) " {"); if (is_inst_class) - prcode(fp, "typeInstances_%C, ", classFQCName(cd)); + prcode(fp, "typeInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_voidp) - prcode(fp, "voidPtrInstances_%C, ", classFQCName(cd)); + prcode(fp, "voidPtrInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_char) - prcode(fp, "charInstances_%C, ", classFQCName(cd)); + prcode(fp, "charInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_string) - prcode(fp, "stringInstances_%C, ", classFQCName(cd)); + prcode(fp, "stringInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_int) - prcode(fp, "intInstances_%C, ", classFQCName(cd)); + prcode(fp, "intInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_long) - prcode(fp, "longInstances_%C, ", classFQCName(cd)); + prcode(fp, "longInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_ulong) - prcode(fp, "unsignedLongInstances_%C, ", classFQCName(cd)); + prcode(fp, "unsignedLongInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_longlong) - prcode(fp, "longLongInstances_%C, ", classFQCName(cd)); + prcode(fp, "longLongInstances_%C, ", classFTQCName(cd)); else prcode(fp,"0, "); if (is_inst_ulonglong) - prcode(fp, "unsignedLongLongInstances_%C, ", classFQCName(cd)); + prcode(fp, "unsignedLongLongInstances_%C, ", classFTQCName(cd)); else prcode(fp, "0, "); if (is_inst_double) - prcode(fp, "doubleInstances_%C", classFQCName(cd)); + prcode(fp, "doubleInstances_%C", classFTQCName(cd)); else prcode(fp, "0"); @@ -9347,7 +9347,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->supers != NULL) prcode(fp, " supers_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9374,7 +9374,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->travcode != NULL) prcode(fp, " traverse_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9383,7 +9383,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->clearcode != NULL) prcode(fp, " clear_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9396,7 +9396,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->getbufcode != NULL) prcode(fp, " getbuffer_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9405,7 +9405,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->releasebufcode != NULL) prcode(fp, " releasebuffer_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9418,7 +9418,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->readbufcode != NULL) prcode(fp, " getreadbuffer_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9427,7 +9427,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->writebufcode != NULL) prcode(fp, " getwritebuffer_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9436,7 +9436,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->segcountcode != NULL) prcode(fp, " getsegcount_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9445,7 +9445,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->charbufcode != NULL) prcode(fp, " getcharbuffer_%C,\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0,\n" @@ -9514,7 +9514,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (cd->picklecode != NULL) prcode(fp, " pickle_%C\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0\n" @@ -9525,21 +9525,21 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) "},\n" ); - if (pluginPyQt3(pt)) + if (pluginPyTQt3(pt)) { if (hasSigSlots(cd)) prcode(fp, " signals_%C\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0\n" ); } - if (pluginPyQt4(pt)) + if (pluginPyTQt4(pt)) { - if (isQObjectSubClass(cd) && !noPyQt4QMetaObject(cd)) + if (isTQObjectSubClass(cd) && !noPyTQt4TQMetaObject(cd)) prcode(fp, " &%U::staticMetaObject,\n" , cd); @@ -9555,7 +9555,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) if (is_signals) prcode(fp, " pyqt4_signals_%C\n" - , classFQCName(cd)); + , classFTQCName(cd)); else prcode(fp, " 0\n" @@ -9569,7 +9569,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp) /* - * Generate an entry in the PyQt4 signal table. + * Generate an entry in the PyTQt4 signal table. */ static void generateSignalTableEntry(sipSpec *pt, classDef *cd, overDef *sig, memberDef *md, int membernr, FILE *fp) @@ -9917,7 +9917,7 @@ static void generateTypeInit(classDef *cd, moduleDef *mod, FILE *fp) if (hasShadow(cd)) prcode(fp, " sip%C *sipCpp = 0;\n" - ,classFQCName(cd)); + ,classFTQCName(cd)); else prcode(fp, " %U *sipCpp = 0;\n" @@ -10196,7 +10196,7 @@ static void generateConstructorCall(classDef *cd, ctorDef *ct, int error_flag, else if (generating_c) prcode(fp, " sipCpp = sipMalloc(sizeof (%S));\n" - ,classFQCName(cd)); + ,classFTQCName(cd)); else { int rgil = ((release_gil || isReleaseGILCtor(ct)) && !isHoldGILCtor(ct)); @@ -10210,7 +10210,7 @@ static void generateConstructorCall(classDef *cd, ctorDef *ct, int error_flag, if (hasShadow(cd)) prcode(fp, -" sipCpp = new sip%C(",classFQCName(cd)); +" sipCpp = new sip%C(",classFTQCName(cd)); else prcode(fp, " sipCpp = new %U(",cd); @@ -10796,7 +10796,7 @@ static void generateHandleResult(overDef *od, int isNew, int result_size, if (ad->atype == mapped_type) prcode(fp, ",sipType_%T,%s", ad, (isTransferredBack(ad) ? "Py_None" : "NULL")); else if (ad->atype == class_type) - prcode(fp, ",sipType_%C,%s", classFQCName(ad->u.cd), (isTransferredBack(ad) ? "Py_None" : "NULL")); + prcode(fp, ",sipType_%C,%s", classFTQCName(ad->u.cd), (isTransferredBack(ad) ? "Py_None" : "NULL")); else if (ad->atype == enum_type && ad->u.ed->fqcname != NULL) prcode(fp,",sipType_%C", ad->u.ed->fqcname); } @@ -11881,7 +11881,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, mappedTypeDef *mt_scope, ctorDef *ct, overDef *od, int secCall, FILE *fp) { - int a, isQtSlot, optargs, arraylenarg, sigarg, handle_self, single_arg; + int a, isTQtSlot, optargs, arraylenarg, sigarg, handle_self, single_arg; int slotconarg, slotdisarg, need_owner; ifaceFileDef *scope; @@ -11903,8 +11903,8 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, handle_self = (od != NULL && od->common->slot == no_slot && !isStatic(od) && c_scope != NULL); - /* Assume there isn't a Qt slot. */ - isQtSlot = FALSE; + /* Assume there isn't a TQt slot. */ + isTQtSlot = FALSE; /* * Generate the local variables that will hold the parsed arguments and @@ -11925,7 +11925,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, case rxcon_type: case rxdis_type: - isQtSlot = TRUE; + isTQtSlot = TRUE; break; case slotcon_type: @@ -11956,7 +11956,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, if (isProtected(od) && hasShadow(c_scope)) prcode(fp, " sip%C *sipCpp;\n" - , classFQCName(c_scope)); + , classFTQCName(c_scope)); else prcode(fp, " %U *sipCpp;\n" @@ -12037,7 +12037,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, if (handle_self) prcode(fp,"%c",(isReallyProtected(od) ? 'p' : 'B')); - else if (isQtSlot && od == NULL) + else if (isTQtSlot && od == NULL) prcode(fp,"C"); for (a = 0; a < sd->nrArgs; ++a) @@ -12229,7 +12229,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, if (ad->atype == class_type && !(generating_c || assignmentHelper(ad->u.cd))) { - fatalScopedName(classFQCName(ad->u.cd)); + fatalScopedName(classFTQCName(ad->u.cd)); fatal(" does not support /Array/\n"); } @@ -12283,8 +12283,8 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, /* Generate the parameters corresponding to the format string. */ if (handle_self) - prcode(fp,", &sipSelf, sipType_%C, &sipCpp",classFQCName(c_scope)); - else if (isQtSlot && od == NULL) + prcode(fp,", &sipSelf, sipType_%C, &sipCpp",classFTQCName(c_scope)); + else if (isTQtSlot && od == NULL) prcode(fp,", sipSelf"); for (a = 0; a < sd->nrArgs; ++a) @@ -12436,7 +12436,7 @@ static int generateArgParser(signatureDef *sd, classDef *c_scope, prcode(fp,"))\n"); - return isQtSlot; + return isTQtSlot; } @@ -13185,7 +13185,7 @@ static void prScopedClassName(FILE *fp, ifaceFileDef *scope, classDef *cd) } else { - scopedNameDef *snd = classFQCName(cd); + scopedNameDef *snd = classFTQCName(cd); while (snd != NULL) { @@ -13224,7 +13224,7 @@ static void prTypeName(FILE *fp, argDef *ad) break; case class_type: - snd = classFQCName(ad->u.cd); + snd = classFTQCName(ad->u.cd); break; default: @@ -13421,9 +13421,9 @@ static void generateClassFromVoid(classDef *cd, const char *cname, const char *vname, FILE *fp) { if (generating_c) - prcode(fp, "%S *%s = (%S *)%s", classFQCName(cd), cname, classFQCName(cd), vname); + prcode(fp, "%S *%s = (%S *)%s", classFTQCName(cd), cname, classFTQCName(cd), vname); else - prcode(fp, "%S *%s = reinterpret_cast<%S *>(%s)", classFQCName(cd), cname, classFQCName(cd), vname); + prcode(fp, "%S *%s = reinterpret_cast<%S *>(%s)", classFTQCName(cd), cname, classFTQCName(cd), vname); } |