From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001
From: tpearson
Date: Sat, 31 Jul 2010 19:44:01 +0000
Subject: Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
python/sip/doc/sipref.html | 114 +++++++++++++++++++++---------------------
python/sip/sipgen/export.c | 12 ++---
python/sip/sipgen/gencode.c | 20 ++++----
python/sip/sipgen/parser.c | 12 ++---
python/sip/sipgen/parser.h | 12 ++---
python/sip/sipgen/sip.h | 4 +-
python/sip/sipgen/transform.c | 10 ++--
python/sip/siplib/qtlib.c | 6 +--
python/sip/siplib/sip.h | 2 +-
python/sip/siplib/sipint.h | 2 +-
python/sip/siplib/siplib.c | 12 ++---
11 files changed, 103 insertions(+), 103 deletions(-)
(limited to 'python/sip')
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.
The library contains a single C++ class called Hello which is derived from
-Qt's QLabel class. It behaves just like QLabel except that the text
+Qt's TQLabel class. It behaves just like TQLabel except that the text
in the label is hard coded to be Hello World. 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 setDefault() that is not implemented
@@ -1006,16 +1006,16 @@ in the Windows version of the library.
// 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
The corresponding SIP specification file would then look something like this:
@@ -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.
of the constructor. It specifies that if the argument is not 0 (i.e. the
Hello 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 QObject class) in
+maintains objects (i.e. instances derived from the TQObject 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.
-
This is a QObject * that is a C++ instance of a class derived from Qt's
-QObject class.
+
This is a TQObject * that is a C++ instance of a class derived from Qt's
+TQObject class.
-
This is a QObject * that is a C++ instance of a class derived from Qt's
-QObject class. It is used as the type of the receiver instead of const
-QObject * in functions that implement a connection to a slot.
+
This is a TQObject * that is a C++ instance of a class derived from Qt's
+TQObject class. It is used as the type of the receiver instead of const
+TQObject * in functions that implement a connection to a slot.
-
This is a QObject * that is a C++ instance of a class derived from Qt's
-QObject class. It is used as the type of the receiver instead of const
-QObject * in functions that implement a disconnection from a slot.
+
This is a TQObject * that is a C++ instance of a class derived from Qt's
+TQObject class. It is used as the type of the receiver instead of const
+TQObject * in functions that implement a disconnection from a slot.
@@ -1755,12 +1755,12 @@ of an explicitly generated signal to a slot.
const char * 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.
-
To take an example, QAccel::connectItem() connects an internally generated
+
To take an example, TQAccel::connectItem() 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:
-bool connectItem(int id, const QObject *receiver, const char *member);
+bool connectItem(int id, const TQObject *receiver, const char *member);
The corresponding SIP specification is:
@@ -1962,8 +1962,8 @@ made to each element of the list.
The handwritten code must explicitly return a PyObject *. If there was an
error then a Python exception must be raised and NULL returned.
-The following example converts a QList<QWidget *> instance to a Python
-list of QWidget instances:
+The following example converts a QList<TQWidget *> instance to a Python
+list of TQWidget instances:
%ConvertFromTypeCode
PyObject *l;
@@ -1973,13 +1973,13 @@ list of QWidget 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.
The handwritten code must not explicitly return.
-The following example shows the sub-class conversion code for QEvent based
+
The following example shows the sub-class conversion code for TQEvent based
class hierarchy in PyQt:
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.
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 QString class to allow Python string objects and
-unicode objects to be used wherever QString instances are expected.
+specification of the TQString class to allow Python string objects and
+unicode objects to be used wherever TQString instances are expected.
The following variables are made available to the handwritten code:
- int *sipIsErr
@@ -2128,8 +2128,8 @@ returned instance is a derived class. See QPoint instances to a
-QList<QPoint> instance:
+The following example converts a Python list of TQPoint instances to a
+QList<TQPoint> instance:
%ConvertToTypeCode
// See if we are just being asked to check the type of the Python
@@ -2142,8 +2142,8 @@ Classes.
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.
}
// 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.
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.
- int sipRes
- The handwritten code should set this to the result to be returned.
-
The following simplified example is taken from PyQt. The QCustomEvent
+
The following simplified example is taken from PyQt. The TQCustomEvent
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:
@@ -2431,7 +2431,7 @@ collector.
int sipRes
The handwritten code should set this to the result to be returned.
-
The following simplified example is taken from PyQt's QCustomEvent class:
+
The following simplified example is taken from PyQt's TQCustomEvent class:
%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
}
-
Using this we can use, for example, QList<QObject *> throughout the
+
Using this we can use, for example, QList<TQObject *> 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.
@@ -3327,7 +3327,7 @@ cases the value is optional.
The following example shows argument and function annotations:
-void exec(QWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/;
+void exec(TQWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/;
Note that the current version of SIP does not complain about unknown
annotations, or annotations used out of their correct context.
@@ -3948,13 +3948,13 @@ comes with a reference.
This connects a signal to a signal or slot and returns Py_True if the
signal was connected or Py_False if not. If there was some other
error then a Python exception is raised and NULL is returned. sender
-is the wrapped QObject derived instance that emits the signal.
+is the wrapped TQObject derived instance that emits the signal.
signal is the typed name of the signal. receiver is the wrapped
-QObject derived instance or Python callable that the signal is
+TQObject derived instance or Python callable that the signal is
connected to. slot is the typed name of the slot, or NULL if
receiver is a Python callable. type is the type of connection and is
cast from Qt::ConnectionType. It is normally only used by PyQt to
-implement QObject.connect().
+implement
TQObject.connect().
@@ -4116,12 +4116,12 @@ needs to be tested once rather than after each call.)
This disconnects a signal from a signal or slot and returns Py_True if
the signal was disconnected or Py_False if not. If there was some
other error then a Python exception is raised and NULL is returned.
-sender is the wrapped QObject derived instance that emits the signal.
+sender is the wrapped TQObject derived instance that emits the signal.
signal is the typed name of the signal. receiver is the wrapped
-QObject derived instance or Python callable that the signal is
+TQObject derived instance or Python callable that the signal is
connected to. slot is the typed name of the slot, or NULL if
receiver is a Python callable. It is normally only used by PyQt to
-implement QObject.disconnect().
+implement TQObject.disconnect().
@@ -4130,10 +4130,10 @@ implement QObject.disconnect()int sipEmitSignal(PyObject *txobj, const char *signal, PyObject *args)
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. txobj is the wrapped QObject derived instance that emits
+returned. txobj is the wrapped TQObject derived instance that emits
the signal. signal is the typed name of the signal. args is a Python
tuple of the signal arguments. It is normally only used by PyQt to
-implement QObject.emit().
+implement TQObject.emit().
@@ -4211,9 +4211,9 @@ description of the arguments.
- const void *sipGetSender()
-- This returns a pointer to the last QObject instance that emitted a Qt
+
- This returns a pointer to the last TQObject instance that emitted a Qt
signal. It is normally only used by PyQt to implement
-QObject.sender().
+TQObject.sender().
@@ -4686,7 +4686,7 @@ Python string.
created is returned. If the instance has already been wrapped then a new
reference to the existing object is returned. addr is the address of
the instance represented as a number. type is the type of the object
-(e.g. qt.QWidget).
+(e.g. qt.TQWidget).
wrapper
This is the type object of the base type of all instances wrapped by SIP.
wrappertype
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);
--
cgit v1.2.3