diff options
Diffstat (limited to 'python/sip')
-rw-r--r-- | python/sip/doc/sipref.html | 114 | ||||
-rw-r--r-- | python/sip/sipgen/export.c | 12 | ||||
-rw-r--r-- | python/sip/sipgen/gencode.c | 20 | ||||
-rw-r--r-- | python/sip/sipgen/parser.c | 12 | ||||
-rw-r--r-- | python/sip/sipgen/parser.h | 12 | ||||
-rw-r--r-- | python/sip/sipgen/sip.h | 4 | ||||
-rw-r--r-- | python/sip/sipgen/transform.c | 10 | ||||
-rw-r--r-- | python/sip/siplib/qtlib.c | 6 | ||||
-rw-r--r-- | python/sip/siplib/sip.h | 2 | ||||
-rw-r--r-- | python/sip/siplib/sipint.h | 2 | ||||
-rw-r--r-- | python/sip/siplib/siplib.c | 12 |
11 files changed, 103 insertions, 103 deletions
diff --git a/python/sip/doc/sipref.html b/python/sip/doc/sipref.html index 850fe61f..71fcbdb4 100644 --- a/python/sip/doc/sipref.html +++ b/python/sip/doc/sipref.html @@ -997,7 +997,7 @@ that is derived from a Qt class. This will demonstrate how SIP allows a class hierarchy to be split across multiple Python extension modules, and will introduce SIP's versioning system.</p> <p>The library contains a single C++ class called <tt class="docutils literal"><span class="pre">Hello</span></tt> which is derived from -Qt's <tt class="docutils literal"><span class="pre">QLabel</span></tt> class. It behaves just like <tt class="docutils literal"><span class="pre">QLabel</span></tt> except that the text +Qt's <tt class="docutils literal"><span class="pre">TQLabel</span></tt> class. It behaves just like <tt class="docutils literal"><span class="pre">TQLabel</span></tt> except that the text in the label is hard coded to be <tt class="docutils literal"><span class="pre">Hello</span> <span class="pre">World</span></tt>. To make the example more interesting we'll also say that the library only supports Qt v3.0 and later, and also includes a function called <tt class="docutils literal"><span class="pre">setDefault()</span></tt> that is not implemented @@ -1006,16 +1006,16 @@ in the Windows version of the library.</p> <pre class="literal-block"> // Define the interface to the hello library. -#include <qlabel.h> -#include <qwidget.h> -#include <qstring.h> +#include <tqlabel.h> +#include <tqwidget.h> +#include <tqstring.h> -class Hello : public QLabel { +class Hello : public TQLabel { // This is needed by the Qt Meta-Object Compiler. Q_OBJECT public: - Hello(QWidget *parent, const char *name = 0, WFlags f = 0); + Hello(TQWidget *parent, const char *name = 0, WFlags f = 0); private: // Prevent instances from being copied. @@ -1024,7 +1024,7 @@ private: }; #if !defined(Q_OS_WIN) -void setDefault(const QString &def); +void setDefault(const TQString &def); #endif </pre> <p>The corresponding SIP specification file would then look something like this:</p> @@ -1037,21 +1037,21 @@ void setDefault(const QString &def); %If (Qt_3_0_0 -) -class Hello : QLabel { +class Hello : TQLabel { %TypeHeaderCode #include <hello.h> %End public: - Hello(QWidget *parent /TransferThis/, const char *name = 0, WFlags f = 0); + Hello(TQWidget *parent /TransferThis/, const char *name = 0, WFlags f = 0); private: Hello(const Hello &); }; %If (!WS_WIN) -void setDefault(const QString &def); +void setDefault(const TQString &def); %End %End @@ -1079,7 +1079,7 @@ removed. This is not supported by SIP.</li> of the constructor. It specifies that if the argument is not 0 (i.e. the <tt class="docutils literal"><span class="pre">Hello</span></tt> instance being constructed has a parent) then ownership of the instance is transferred from Python to C++. It is needed because Qt -maintains objects (i.e. instances derived from the <tt class="docutils literal"><span class="pre">QObject</span></tt> class) in +maintains objects (i.e. instances derived from the <tt class="docutils literal"><span class="pre">TQObject</span></tt> class) in a hierachy. When an object is destroyed all of its children are also automatically destroyed. It is important, therefore, that the Python garbage collector doesn't also try and destroy them. This is covered in @@ -1722,20 +1722,20 @@ Handwritten code must be provided to interpret the conversion correctly.</p> </div> <div class="section"> <h3><a class="toc-backref" href="#id55" id="sip-qobject" name="sip-qobject">6.3.9 SIP_QOBJECT</a></h3> -<p>This is a <tt class="docutils literal"><span class="pre">QObject</span> <span class="pre">*</span></tt> that is a C++ instance of a class derived from Qt's -<tt class="docutils literal"><span class="pre">QObject</span></tt> class.</p> +<p>This is a <tt class="docutils literal"><span class="pre">TQObject</span> <span class="pre">*</span></tt> that is a C++ instance of a class derived from Qt's +<tt class="docutils literal"><span class="pre">TQObject</span></tt> class.</p> </div> <div class="section"> <h3><a class="toc-backref" href="#id56" id="sip-rxobj-con" name="sip-rxobj-con">6.3.10 SIP_RXOBJ_CON</a></h3> -<p>This is a <tt class="docutils literal"><span class="pre">QObject</span> <span class="pre">*</span></tt> that is a C++ instance of a class derived from Qt's -<tt class="docutils literal"><span class="pre">QObject</span></tt> class. It is used as the type of the receiver instead of <tt class="docutils literal"><span class="pre">const</span> -<span class="pre">QObject</span> <span class="pre">*</span></tt> in functions that implement a connection to a slot.</p> +<p>This is a <tt class="docutils literal"><span class="pre">TQObject</span> <span class="pre">*</span></tt> that is a C++ instance of a class derived from Qt's +<tt class="docutils literal"><span class="pre">TQObject</span></tt> class. It is used as the type of the receiver instead of <tt class="docutils literal"><span class="pre">const</span> +<span class="pre">TQObject</span> <span class="pre">*</span></tt> in functions that implement a connection to a slot.</p> </div> <div class="section"> <h3><a class="toc-backref" href="#id57" id="sip-rxobj-dis" name="sip-rxobj-dis">6.3.11 SIP_RXOBJ_DIS</a></h3> -<p>This is a <tt class="docutils literal"><span class="pre">QObject</span> <span class="pre">*</span></tt> that is a C++ instance of a class derived from Qt's -<tt class="docutils literal"><span class="pre">QObject</span></tt> class. It is used as the type of the receiver instead of <tt class="docutils literal"><span class="pre">const</span> -<span class="pre">QObject</span> <span class="pre">*</span></tt> in functions that implement a disconnection from a slot.</p> +<p>This is a <tt class="docutils literal"><span class="pre">TQObject</span> <span class="pre">*</span></tt> that is a C++ instance of a class derived from Qt's +<tt class="docutils literal"><span class="pre">TQObject</span></tt> class. It is used as the type of the receiver instead of <tt class="docutils literal"><span class="pre">const</span> +<span class="pre">TQObject</span> <span class="pre">*</span></tt> in functions that implement a disconnection from a slot.</p> </div> <div class="section"> <h3><a class="toc-backref" href="#id58" id="sip-signal" name="sip-signal">6.3.12 SIP_SIGNAL</a></h3> @@ -1755,12 +1755,12 @@ of an explicitly generated signal to a slot.</p> <tt class="docutils literal"><span class="pre">const</span> <span class="pre">char</span> <span class="pre">*</span></tt> in functions that implement the connection of an internally generated signal to a slot. The type includes a comma separated list of types that is the C++ signature of of the signal.</p> -<p>To take an example, <tt class="docutils literal"><span class="pre">QAccel::connectItem()</span></tt> connects an internally generated +<p>To take an example, <tt class="docutils literal"><span class="pre">TQAccel::connectItem()</span></tt> connects an internally generated signal to a slot. The signal is emitted when the keyboard accelerator is activated and it has a single integer argument that is the ID of the accelerator. The C++ signature is:</p> <pre class="literal-block"> -bool connectItem(int id, const QObject *receiver, const char *member); +bool connectItem(int id, const TQObject *receiver, const char *member); </pre> <p>The corresponding SIP specification is:</p> <pre class="literal-block"> @@ -1962,8 +1962,8 @@ made to each element of the list.</dd> </dl> <p>The handwritten code must explicitly return a <tt class="docutils literal"><span class="pre">PyObject</span> <span class="pre">*</span></tt>. If there was an error then a Python exception must be raised and <tt class="docutils literal"><span class="pre">NULL</span></tt> returned.</p> -<p>The following example converts a <tt class="docutils literal"><span class="pre">QList<QWidget</span> <span class="pre">*></span></tt> instance to a Python -list of <tt class="docutils literal"><span class="pre">QWidget</span></tt> instances:</p> +<p>The following example converts a <tt class="docutils literal"><span class="pre">QList<TQWidget</span> <span class="pre">*></span></tt> instance to a Python +list of <tt class="docutils literal"><span class="pre">TQWidget</span></tt> instances:</p> <pre class="literal-block"> %ConvertFromTypeCode PyObject *l; @@ -1973,13 +1973,13 @@ list of <tt class="docutils literal"><span class="pre">QWidget</span></tt> insta return NULL; // Go through each element in the C++ instance and convert it to a - // wrapped QWidget. + // wrapped TQWidget. for (int i = 0; i < sipCpp -> size(); ++i) { - QWidget *w = sipCpp -> at(i); + TQWidget *w = sipCpp -> at(i); PyObject *wobj; - // Get the Python wrapper for the QWidget instance, creating a new + // Get the Python wrapper for the TQWidget instance, creating a new // one if necessary, and handle any ownership transfer. if ((wobj = sipConvertFromInstance(w, sipClass_QWidget, sipTransferObj)) == NULL) { @@ -2041,21 +2041,21 @@ have to recognise the exact class, only the most specific sub-class that it can.</dd> </dl> <p>The handwritten code must not explicitly return.</p> -<p>The following example shows the sub-class conversion code for <tt class="docutils literal"><span class="pre">QEvent</span></tt> based +<p>The following example shows the sub-class conversion code for <tt class="docutils literal"><span class="pre">TQEvent</span></tt> based class hierarchy in PyQt:</p> <pre class="literal-block"> class QEvent { %ConvertToSubClassCode - // QEvent sub-classes provide a unique type ID. + // TQEvent sub-classes provide a unique type ID. switch (sipCpp -> type()) { - case QEvent::Timer: + case TQEvent::Timer: sipClass = sipClass_QTimerEvent; break; - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: sipClass = sipClass_QKeyEvent; break; @@ -2089,8 +2089,8 @@ specification. The code is also called to determine if the Python object is of the correct type prior to conversion.</p> <p>When used as part of a class specification it can automatically convert additional types of Python object. For example, PyQt uses it in the -specification of the <tt class="docutils literal"><span class="pre">QString</span></tt> class to allow Python string objects and -unicode objects to be used wherever <tt class="docutils literal"><span class="pre">QString</span></tt> instances are expected.</p> +specification of the <tt class="docutils literal"><span class="pre">TQString</span></tt> class to allow Python string objects and +unicode objects to be used wherever <tt class="docutils literal"><span class="pre">TQString</span></tt> instances are expected.</p> <p>The following variables are made available to the handwritten code:</p> <dl class="docutils"> <dt>int *sipIsErr</dt> @@ -2128,8 +2128,8 @@ returned instance is a derived class. See <a class="reference" href="#generated Classes</a>.</li> </ul> </blockquote> -<p>The following example converts a Python list of <tt class="docutils literal"><span class="pre">QPoint</span></tt> instances to a -<tt class="docutils literal"><span class="pre">QList<QPoint></span></tt> instance:</p> +<p>The following example converts a Python list of <tt class="docutils literal"><span class="pre">TQPoint</span></tt> instances to a +<tt class="docutils literal"><span class="pre">QList<TQPoint></span></tt> instance:</p> <pre class="literal-block"> %ConvertToTypeCode // See if we are just being asked to check the type of the Python @@ -2142,8 +2142,8 @@ Classes</a>.</li> return 0; // Check the type of each element. We specify SIP_NOT_NONE to - // disallow None because it is a list of QPoint, not of a pointer - // to a QPoint, so None isn't appropriate. + // disallow None because it is a list of TQPoint, not of a pointer + // to a TQPoint, so None isn't appropriate. for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_QPoint, SIP_NOT_NONE)) @@ -2154,17 +2154,17 @@ Classes</a>.</li> } // Create the instance on the heap. - QList<QPoint> *ql = new QList<QPoint>; + QList<TQPoint> *ql = new QList<TQPoint>; for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) { - QPoint *qp; + TQPoint *qp; int state; // Get the address of the element's C++ instance. Note that, in // this case, we don't apply any ownership changes to the list // elements, only to the list itself. - qp = reinterpret_cast<QPoint *>(sipConvertToInstance( + qp = reinterpret_cast<TQPoint *>(sipConvertToInstance( PyList_GET_ITEM(sipPy, i), sipClass_QPoint, 0, SIP_NOT_NONE, @@ -2184,7 +2184,7 @@ Classes</a>.</li> ql -> append(*qp); - // A copy of the QPoint was appended to the list so we no longer + // A copy of the TQPoint was appended to the list so we no longer // need it. It may be a temporary instance that should be // destroyed, or a wrapped instance that should not be destroyed. // sipReleaseInstance() will do the right thing. @@ -2387,7 +2387,7 @@ pointer to the structure or class.</dd> <dt>int sipRes</dt> <dd>The handwritten code should set this to the result to be returned.</dd> </dl> -<p>The following simplified example is taken from PyQt. The <tt class="docutils literal"><span class="pre">QCustomEvent</span></tt> +<p>The following simplified example is taken from PyQt. The <tt class="docutils literal"><span class="pre">TQCustomEvent</span></tt> class allows arbitary data to be attached to the event. In PyQt this data is always a Python object and so should be handled by the garbage collector:</p> <pre class="literal-block"> @@ -2431,7 +2431,7 @@ collector.</dd> <dt>int sipRes</dt> <dd>The handwritten code should set this to the result to be returned.</dd> </dl> -<p>The following simplified example is taken from PyQt's <tt class="docutils literal"><span class="pre">QCustomEvent</span></tt> class:</p> +<p>The following simplified example is taken from PyQt's <tt class="docutils literal"><span class="pre">TQCustomEvent</span></tt> class:</p> <pre class="literal-block"> %GCTraverseCode PyObject *obj; @@ -2681,7 +2681,7 @@ template<Type *> { %TypeHeaderCode // Include the library interface to the type being mapped. -#include <qlist.h> +#include <tqlist.h> %End %ConvertToTypeCode @@ -2765,7 +2765,7 @@ template<Type *> %End } </pre> -<p>Using this we can use, for example, <tt class="docutils literal"><span class="pre">QList<QObject</span> <span class="pre">*></span></tt> throughout the +<p>Using this we can use, for example, <tt class="docutils literal"><span class="pre">QList<TQObject</span> <span class="pre">*></span></tt> throughout the module's specification files (and in any module that imports this one). The generated code will automatically map this to and from a Python list of QObject instances when appropriate.</p> @@ -3327,7 +3327,7 @@ cases the value is optional.</dd> </dl> <p>The following example shows argument and function annotations:</p> <pre class="literal-block"> -void exec(QWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/; +void exec(TQWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/; </pre> <p>Note that the current version of SIP does not complain about unknown annotations, or annotations used out of their correct context.</p> @@ -3948,13 +3948,13 @@ comes with a reference.</dd> <dd>This connects a signal to a signal or slot and returns <tt class="docutils literal"><span class="pre">Py_True</span></tt> if the signal was connected or <tt class="docutils literal"><span class="pre">Py_False</span></tt> if not. If there was some other error then a Python exception is raised and <tt class="docutils literal"><span class="pre">NULL</span></tt> is returned. <em>sender</em> -is the wrapped <tt class="docutils literal"><span class="pre">QObject</span></tt> derived instance that emits the signal. +is the wrapped <tt class="docutils literal"><span class="pre">TQObject</span></tt> derived instance that emits the signal. <em>signal</em> is the typed name of the signal. <em>receiver</em> is the wrapped -<tt class="docutils literal"><span class="pre">QObject</span></tt> derived instance or Python callable that the signal is +<tt class="docutils literal"><span class="pre">TQObject</span></tt> derived instance or Python callable that the signal is connected to. <em>slot</em> is the typed name of the slot, or <tt class="docutils literal"><span class="pre">NULL</span></tt> if <em>receiver</em> is a Python callable. <em>type</em> is the type of connection and is cast from Qt::ConnectionType. It is normally only used by PyQt to -implement <tt class="docutils literal"><span class="pre">QObject.connect()</span></tt>.</dd> +implement <tt class="docutils literal"><span class="pre">TQObject.connect()</span></tt>.</dd> </dl> </div> <div class="section"> @@ -4116,12 +4116,12 @@ needs to be tested once rather than after each call.)</p> <dd>This disconnects a signal from a signal or slot and returns <tt class="docutils literal"><span class="pre">Py_True</span></tt> if the signal was disconnected or <tt class="docutils literal"><span class="pre">Py_False</span></tt> if not. If there was some other error then a Python exception is raised and <tt class="docutils literal"><span class="pre">NULL</span></tt> is returned. -<em>sender</em> is the wrapped <tt class="docutils literal"><span class="pre">QObject</span></tt> derived instance that emits the signal. +<em>sender</em> is the wrapped <tt class="docutils literal"><span class="pre">TQObject</span></tt> derived instance that emits the signal. <em>signal</em> is the typed name of the signal. <em>receiver</em> is the wrapped -<tt class="docutils literal"><span class="pre">QObject</span></tt> derived instance or Python callable that the signal is +<tt class="docutils literal"><span class="pre">TQObject</span></tt> derived instance or Python callable that the signal is connected to. <em>slot</em> is the typed name of the slot, or <tt class="docutils literal"><span class="pre">NULL</span></tt> if <em>receiver</em> is a Python callable. It is normally only used by PyQt to -implement <tt class="docutils literal"><span class="pre">QObject.disconnect()</span></tt>.</dd> +implement <tt class="docutils literal"><span class="pre">TQObject.disconnect()</span></tt>.</dd> </dl> </div> <div class="section"> @@ -4130,10 +4130,10 @@ implement <tt class="docutils literal"><span class="pre">QObject.disconnect()</s <dt>int sipEmitSignal(PyObject *txobj, const char *signal, PyObject *args)</dt> <dd>This emits a signal and returns zero if there was no error. If there was an error then a Python exception is raised and a negative value is -returned. <em>txobj</em> is the wrapped <tt class="docutils literal"><span class="pre">QObject</span></tt> derived instance that emits +returned. <em>txobj</em> is the wrapped <tt class="docutils literal"><span class="pre">TQObject</span></tt> derived instance that emits the signal. <em>signal</em> is the typed name of the signal. <em>args</em> is a Python tuple of the signal arguments. It is normally only used by PyQt to -implement <tt class="docutils literal"><span class="pre">QObject.emit()</span></tt>.</dd> +implement <tt class="docutils literal"><span class="pre">TQObject.emit()</span></tt>.</dd> </dl> </div> <div class="section"> @@ -4211,9 +4211,9 @@ description of the arguments.</dd> <h2><a class="toc-backref" href="#id179" id="sipgetsender" name="sipgetsender">9.34 sipGetSender()</a></h2> <dl class="docutils"> <dt>const void *sipGetSender()</dt> -<dd>This returns a pointer to the last <tt class="docutils literal"><span class="pre">QObject</span></tt> instance that emitted a Qt +<dd>This returns a pointer to the last <tt class="docutils literal"><span class="pre">TQObject</span></tt> instance that emitted a Qt signal. It is normally only used by PyQt to implement -<tt class="docutils literal"><span class="pre">QObject.sender()</span></tt>.</dd> +<tt class="docutils literal"><span class="pre">TQObject.sender()</span></tt>.</dd> </dl> </div> <div class="section"> @@ -4686,7 +4686,7 @@ Python string.</dd> created is returned. If the instance has already been wrapped then a new reference to the existing object is returned. <em>addr</em> is the address of the instance represented as a number. <em>type</em> is the type of the object -(e.g. <tt class="docutils literal"><span class="pre">qt.QWidget</span></tt>).</dd> +(e.g. <tt class="docutils literal"><span class="pre">qt.TQWidget</span></tt>).</dd> <dt>wrapper</dt> <dd>This is the type object of the base type of all instances wrapped by SIP.</dd> <dt>wrappertype</dt> diff --git a/python/sip/sipgen/export.c b/python/sip/sipgen/export.c index a6e62523..5200b2cf 100644 --- a/python/sip/sipgen/export.c +++ b/python/sip/sipgen/export.c @@ -791,7 +791,7 @@ static void xmlType(argDef *ad, int sec, FILE *fp) { int a; - prcode(fp, "SLOT("); + prcode(fp, "TQT_SLOT("); for (a = 0; a < ad->u.sa->nrArgs; ++a) { @@ -892,11 +892,11 @@ static const char *pyType(argDef *ad, int sec, classDef **scope) break; case signal_type: - type_name = "SIGNAL()"; + type_name = "TQT_SIGNAL()"; break; case slot_type: - type_name = "SLOT()"; + type_name = "TQT_SLOT()"; break; case rxcon_type: @@ -904,12 +904,12 @@ static const char *pyType(argDef *ad, int sec, classDef **scope) if (sec) type_name = "callable"; else - type_name = "QObject"; + type_name = "TQObject"; break; case qobject_type: - type_name = "QObject"; + type_name = "TQObject"; break; case ustring_type: @@ -987,7 +987,7 @@ static const char *pyType(argDef *ad, int sec, classDef **scope) case anyslot_type: /* Need to check if this is enough. */ - type_name = "SLOT()"; + type_name = "TQT_SLOT()"; break; default: diff --git a/python/sip/sipgen/gencode.c b/python/sip/sipgen/gencode.c index b23ee2b1..ff1b93b9 100644 --- a/python/sip/sipgen/gencode.c +++ b/python/sip/sipgen/gencode.c @@ -649,10 +649,10 @@ static void generateInternalAPIHeader(sipSpec *pt,char *codeDir,stringList *xsl) if (optQ_OBJECT4(pt)) prcode(fp, "\n" -"typedef const QMetaObject *(*sip_qt_metaobject_func)(sipWrapper *,sipWrapperType *,const QMetaObject *);\n" +"typedef const TQMetaObject *(*sip_qt_metaobject_func)(sipWrapper *,sipWrapperType *,const TQMetaObject *);\n" "extern sip_qt_metaobject_func sip_%s_qt_metaobject;\n" "\n" -"typedef int (*sip_qt_metacall_func)(sipWrapper *,sipWrapperType *,QMetaObject::Call,int,void **);\n" +"typedef int (*sip_qt_metacall_func)(sipWrapper *,sipWrapperType *,TQMetaObject::Call,int,void **);\n" "extern sip_qt_metacall_func sip_%s_qt_metacall;\n" , mname , mname); @@ -4730,12 +4730,12 @@ static void generateShadowCode(sipSpec *pt,classDef *cd,FILE *fp) { prcode(fp, "\n" -"const QMetaObject *sip%C::metaObject() const\n" +"const TQMetaObject *sip%C::metaObject() const\n" "{\n" " return sip_%s_qt_metaobject(sipPySelf,sipClass_%C,%S::metaObject());\n" "}\n" "\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" " sip%C::metaObject();\n" "\n" @@ -6623,8 +6623,8 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp) if (isQObjectSubClass(cd) && optQ_OBJECT4(pt)) prcode(fp, "\n" -" const QMetaObject *metaObject() const;\n" -" int qt_metacall(QMetaObject::Call,int,void **);\n" +" const TQMetaObject *metaObject() const;\n" +" int qt_metacall(TQMetaObject::Call,int,void **);\n" ); /* The exposure of protected enums. */ @@ -7033,7 +7033,7 @@ static void generateNamedBaseType(argDef *ad,char *name,FILE *fp) case rxcon_type: case rxdis_type: nr_derefs = 1; - prcode(fp,"QObject"); + prcode(fp,"TQObject"); break; case mapped_type: @@ -7865,13 +7865,13 @@ static void generateRegisterMetaType(classDef *cd, FILE *fp) if (classFQCName(cd)->next == NULL) { - if (strcmp(classBaseName(cd), "QChar") == 0) + if (strcmp(classBaseName(cd), "TQChar") == 0) return; - if (strcmp(classBaseName(cd), "QString") == 0) + if (strcmp(classBaseName(cd), "TQString") == 0) return; - if (strcmp(classBaseName(cd), "QByteArray") == 0) + if (strcmp(classBaseName(cd), "TQByteArray") == 0) return; } diff --git a/python/sip/sipgen/parser.c b/python/sip/sipgen/parser.c index bca393aa..04a72f68 100644 --- a/python/sip/sipgen/parser.c +++ b/python/sip/sipgen/parser.c @@ -125,9 +125,9 @@ TK_LOGICAL_OR = 327, TK_CONST = 328, TK_STATIC = 329, - TK_SIPSIGNAL = 330, - TK_SIPSLOT = 331, - TK_SIPANYSLOT = 332, + TK_SIPQT_SIGNAL = 330, + TK_SIPQT_SLOT = 331, + TK_SIPANYQT_SLOT = 332, TK_SIPRXCON = 333, TK_SIPRXDIS = 334, TK_SIPSLOTCON = 335, @@ -226,9 +226,9 @@ #define TK_LOGICAL_OR 327 #define TK_CONST 328 #define TK_STATIC 329 -#define TK_SIPSIGNAL 330 -#define TK_SIPSLOT 331 -#define TK_SIPANYSLOT 332 +#define TK_SIPQT_SIGNAL 330 +#define TK_SIPQT_SLOT 331 +#define TK_SIPANYQT_SLOT 332 #define TK_SIPRXCON 333 #define TK_SIPRXDIS 334 #define TK_SIPSLOTCON 335 diff --git a/python/sip/sipgen/parser.h b/python/sip/sipgen/parser.h index 72165974..7a75072d 100644 --- a/python/sip/sipgen/parser.h +++ b/python/sip/sipgen/parser.h @@ -101,9 +101,9 @@ TK_LOGICAL_OR = 327, TK_CONST = 328, TK_STATIC = 329, - TK_SIPSIGNAL = 330, - TK_SIPSLOT = 331, - TK_SIPANYSLOT = 332, + TK_SIPQT_SIGNAL = 330, + TK_SIPQT_SLOT = 331, + TK_SIPANYQT_SLOT = 332, TK_SIPRXCON = 333, TK_SIPRXDIS = 334, TK_SIPSLOTCON = 335, @@ -202,9 +202,9 @@ #define TK_LOGICAL_OR 327 #define TK_CONST 328 #define TK_STATIC 329 -#define TK_SIPSIGNAL 330 -#define TK_SIPSLOT 331 -#define TK_SIPANYSLOT 332 +#define TK_SIPQT_SIGNAL 330 +#define TK_SIPQT_SLOT 331 +#define TK_SIPANYQT_SLOT 332 #define TK_SIPRXCON 333 #define TK_SIPRXDIS 334 #define TK_SIPSLOTCON 335 diff --git a/python/sip/sipgen/sip.h b/python/sip/sipgen/sip.h index f7fa46c3..a259a6dc 100644 --- a/python/sip/sipgen/sip.h +++ b/python/sip/sipgen/sip.h @@ -79,7 +79,7 @@ #define CLASS_IS_EXTERNAL 0x00100000 /* It is external. */ #define CLASS_IS_DELAYED_DTOR 0x00200000 /* The dtor is delayed. */ #define CLASS_NO_DEFAULT_CTORS 0x00400000 /* Don't create default ctors. */ -#define CLASS_QOBJECT_SUB 0x00800000 /* It is derived from QObject. */ +#define CLASS_QOBJECT_SUB 0x00800000 /* It is derived from TQObject. */ #define CLASS_DTOR_HOLD_GIL 0x01000000 /* The dtor holds the GIL. */ #define hasEnums(cd) ((cd)->classflags & CLASS_HAS_ENUMS) @@ -908,7 +908,7 @@ typedef struct { exceptionDef *exceptions; /* The list of exceptions. */ mappedTypeDef *mappedtypes; /* The mapped types. */ mappedTypeTmplDef *mappedtypetemplates; /* The list of mapped type templates. */ - int qobjclass; /* QObject class, -1 if none. */ + int qobjclass; /* TQObject class, -1 if none. */ enumDef *enums; /* List of enums. */ varDef *vars; /* List of variables. */ memberDef *othfuncs; /* List of other functions. */ diff --git a/python/sip/sipgen/transform.c b/python/sip/sipgen/transform.c index 036a124b..d19fb719 100644 --- a/python/sip/sipgen/transform.c +++ b/python/sip/sipgen/transform.c @@ -111,10 +111,10 @@ 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) + if (strcmp(classBaseName(cd), "TQObject") == 0) setIsQObjectSubClass(cd); cd = next; @@ -842,7 +842,7 @@ static void setHierarchy(sipSpec *pt,classDef *base,classDef *cd, appendToMRO(cd -> mro,&tailp,mro -> 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)) @@ -2830,10 +2830,10 @@ static void assignClassNrs(sipSpec *pt,moduleDef *mod,nodeDef *nd) cd -> classnr = mod -> nrclasses++; /* - * If we find a class defined in the main module called QObject, assume + * If we find a class defined in the main module called TQObject, assume * it's Qt. */ - if (mod == pt -> module && strcmp(classBaseName(cd),"QObject") == 0) + if (mod == pt -> module && strcmp(classBaseName(cd),"TQObject") == 0) pt -> qobjclass = cd -> classnr; } diff --git a/python/sip/siplib/qtlib.c b/python/sip/siplib/qtlib.c index da7637f1..f3ba4301 100644 --- a/python/sip/siplib/qtlib.c +++ b/python/sip/siplib/qtlib.c @@ -278,7 +278,7 @@ sipSignature *sip_api_parse_signature(const char *sig) case 8: if (strncmp(dp, "unsigned", 8) == 0) sat = uint_sat; - else if (strncmp(dp, "QVariant", 8) == 0) + else if (strncmp(dp, "TQVariant", 8) == 0) { if (indir == 0) { @@ -1153,7 +1153,7 @@ static int saveSlot(sipSlot *sp, PyObject *rxObj, const char *slot) * because they are generated on the fly and we can't take a * reference as that may keep the instance (ie. self) alive. * We therefore treat it as if the user had specified the slot - * at "obj, SLOT('meth()')" rather than "obj.meth" (see below). + * at "obj, TQT_SLOT('meth()')" rather than "obj.meth" (see below). */ const char *meth; @@ -1200,7 +1200,7 @@ static int saveSlot(sipSlot *sp, PyObject *rxObj, const char *slot) { /* * The user has decided to connect a Python signal to a Qt slot and - * specified the slot as "obj, SLOT('meth()')" rather than "obj.meth". + * specified the slot as "obj, TQT_SLOT('meth()')" rather than "obj.meth". */ char *tail; diff --git a/python/sip/siplib/sip.h b/python/sip/siplib/sip.h index d08a913d..92bcda4e 100644 --- a/python/sip/siplib/sip.h +++ b/python/sip/siplib/sip.h @@ -1037,7 +1037,7 @@ typedef struct _sipSignature { * A connection to a universal slot. */ typedef struct _sipSlotConnection { - /* The transmitter QObject. */ + /* The transmitter TQObject. */ void *sc_transmitter; /* The parsed signature. */ diff --git a/python/sip/siplib/sipint.h b/python/sip/siplib/sipint.h index 97c35631..0a8f2459 100644 --- a/python/sip/siplib/sipint.h +++ b/python/sip/siplib/sipint.h @@ -57,7 +57,7 @@ extern PyInterpreterState *sipInterpreter; /* The interpreter. */ extern sipQtAPI *sipQtSupport; /* The Qt support API. */ -extern sipWrapperType *sipQObjectClass; /* The Python QObject class. */ +extern sipWrapperType *sipQObjectClass; /* The Python TQObject class. */ void *sip_api_convert_rx(sipWrapper *txSelf, const char *sigargs, PyObject *rxObj, const char *slot, diff --git a/python/sip/siplib/siplib.c b/python/sip/siplib/siplib.c index d546522c..a715e830 100644 --- a/python/sip/siplib/siplib.c +++ b/python/sip/siplib/siplib.c @@ -810,10 +810,10 @@ static int sip_api_export_module(sipExportedModuleDef *client, return -1; } - /* Only one module can claim to wrap QObject. */ + /* Only one module can claim to wrap TQObject. */ if (em->em_qt_api != NULL && client->em_qt_api != NULL) { - PyErr_Format(PyExc_RuntimeError, "the %s and %s modules both wrap the QObject class", client->em_name, em->em_name); + PyErr_Format(PyExc_RuntimeError, "the %s and %s modules both wrap the TQObject class", client->em_name, em->em_name); return -1; } @@ -2510,7 +2510,7 @@ static int parsePass1(sipWrapper **selfp, int *selfargp, int *argsParsedp, case 'R': { - /* Sub-class of QObject. */ + /* Sub-class of TQObject. */ if (sipQtSupport == NULL || !PyObject_TypeCheck(arg, (PyTypeObject *)sipQObjectClass)) valid = PARSE_TYPE; @@ -3818,8 +3818,8 @@ static PyObject *handleGetLazyAttr(PyObject *nameobj,sipWrapperType *wt, * lazy attribute of the same name. In this case (because we * call the standard getattro code first) this one would be * wrongly found in preference to the one in the sub-class. - * The example in PyQt is QScrollView::ResizePolicy and - * QListView::WidthMode both having a member called Manual. + * The example in PyQt is TQScrollView::ResizePolicy and + * TQListView::WidthMode both having a member called Manual. * One way around this might be to cache them in a separate * dictionary and search that before doing the binary search * through the lazy enum table. @@ -6618,7 +6618,7 @@ static void sipWrapper_dealloc(sipWrapper *self) /* * Now that the C++ object no longer exists we can tidy up the Python * object. We used to do this first but that meant lambda slots were - * removed too soon (if they were connected to QObject.destroyed()). + * removed too soon (if they were connected to TQObject.destroyed()). */ sipWrapper_clear(self); |