Initial TQt conversion

pull/1/head
Timothy Pearson 13 years ago
parent 6c4cc3653e
commit 7d27356baf

@ -14,14 +14,14 @@ int main(int argc, char **argv)
* to be a builtin in the custom interpreter. The name of the function
* will be the name of the module with "init" prepended. The modules
* must be built as static libraries (using the -k flag to configure.py
* for SIP and PyQt).
* for SIP and PyTQt).
*/
/* The sip module will be builtin. */
extern void initsip(void);
/*
* Uncomment these (and in the structure below) to include the PyQt
* Uncomment these (and in the structure below) to include the PyTQt
* modules as builtins.
*/
/* extern void initqt(void);*/

@ -18,14 +18,14 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
* to be a builtin in the custom interpreter. The name of the function
* will be the name of the module with "init" prepended. The modules
* must be built as static libraries (using the -k flag to configure.py
* for SIP and PyQt).
* for SIP and PyTQt).
*/
/* The sip module will be builtin. */
extern void initsip(void);
/*
* Uncomment these (and in the structure below) to include the PyQt
* Uncomment these (and in the structure below) to include the PyTQt
* modules as builtins.
*/
/* extern void initqt(void);*/

@ -162,7 +162,7 @@ Argument Annotations
encoding is ``"None"`` and the ``str`` type otherwise.
Python v2 will use the ``str`` type to represent the argument if the
encoding is ``"None"`` and the ``unicode`` type otherwise.
encoding is ``"None"`` and the ``tqunicode`` type otherwise.
.. argument-annotation:: GetWrapper

@ -202,13 +202,13 @@ specification files.
``u`` (long) [unsigned int]
Convert a C/C++ ``unsigned int`` to a Python long.
``w`` (unicode/string) [wchar_t]
Convert a C/C++ wide character to a Python v2 unicode object or a
``w`` (tqunicode/string) [wchar_t]
Convert a C/C++ wide character to a Python v2 tqunicode object or a
Python v3 string object.
``x`` (unicode/string) [wchar_t \*]
``x`` (tqunicode/string) [wchar_t \*]
Convert a C/C++ ``L'\0'`` terminated wide character string to a Python
v2 unicode object or a Python v3 string object. If the string pointer
v2 tqunicode object or a Python v3 string object. If the string pointer
is ``NULL`` then the result is ``Py_None``.
``A`` (string) [char \*]
@ -272,8 +272,8 @@ specification files.
Convert a named C/C++ ``enum`` to an instance of the corresponding
Python named enum type.
``G`` (unicode) [wchar_t \*, :cmacro:`SIP_SSIZE_T`]
Convert a C/C++ wide character array and its length to a Python unicode
``G`` (tqunicode) [wchar_t \*, :cmacro:`SIP_SSIZE_T`]
Convert a C/C++ wide character array and its length to a Python tqunicode
object. If the array is ``NULL`` then the length is ignored and the
result is ``Py_None``.
@ -1124,7 +1124,7 @@ specification files.
Convert a Python string-like object of length 1 to a C/C++ ``char``
according to the encoding ``e``. ``e`` can either be ``A`` for ASCII,
``L`` for Latin-1, or ``8`` for UTF-8. For Python v2 the object may be
either a string or a unicode object that can be encoded. For Python v3
either a string or a tqunicode object that can be encoded. For Python v3
the object may either be a bytes object or a string object that can be
encoded. An object that supports the buffer protocol may also be used.
@ -1182,12 +1182,12 @@ specification files.
``u`` (long) [unsigned int \*]
Convert a Python long to a C/C++ ``unsigned int``.
``w`` (unicode/string) [wchar_t \*]
Convert a Python v2 string or unicode object or a Python v3 string
``w`` (tqunicode/string) [wchar_t \*]
Convert a Python v2 string or tqunicode object or a Python v3 string
object of length 1 to a C/C++ wide character.
``x`` (unicode/string) [wchar_t \*\*]
Convert a Python v2 string or unicode object or a Python v3 string
``x`` (tqunicode/string) [wchar_t \*\*]
Convert a Python v2 string or tqunicode object or a Python v3 string
object to a C/C++ ``L'\0'`` terminated wide character string. If the
Python object is ``Py_None`` then the string is ``NULL``.
@ -1199,7 +1199,7 @@ specification files.
identifies the object in the context defined by the ``S`` format
character and allows an extra reference to the object to be kept to
ensure that the string remains valid. For Python v2 the object may be
either a string or a unicode object that can be encoded. For Python v3
either a string or a tqunicode object that can be encoded. For Python v3
the object may either be a bytes object or a string object that can be
encoded. An object that supports the buffer protocol may also be used.
@ -1258,8 +1258,8 @@ specification files.
``F`` (wrapped enum) [:ctype:`sipTypeDef` \*, enum \*]
Convert a Python named enum type to the corresponding C/C++ ``enum``.
``G`` (unicode/string) [wchar_t \*\*, :cmacro:`SIP_SSIZE_T` \*]
Convert a Python v2 string or unicode object or a Python v3 string
``G`` (tqunicode/string) [wchar_t \*\*, :cmacro:`SIP_SSIZE_T` \*]
Convert a Python v2 string or tqunicode object or a Python v3 string
object to a C/C++ wide character array and its length. If the Python
object is ``Py_None`` then the array and length are ``NULL`` and zero
respectively.
@ -1696,7 +1696,7 @@ name prefixed by ``sip``. For example, the derived class for class ``Klass``
is ``sipKlass``.
If a C++ class doesn't have any virtual or protected methods in it or any of
it's super-class hierarchy, or does not emit any Qt signals, then a derived
it's super-class hierarchy, or does not emit any Qt Q_SIGNALS, then a derived
class is not generated.
Most of the time handwritten code should ignore the derived classes. The only

@ -515,7 +515,7 @@ 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.
tqunicode objects to be used wherever ``QString`` instances are expected.
The following variables are made available to the handwritten code:

@ -74,7 +74,7 @@ SIP, and the bindings it produces, have the following features:
- support for C++ exceptions and wrapping them as Python exceptions
- the automatic generation of complementary rich comparison slots
- the automatic generation of complementary rich comparison Q_SLOTS
- support for deprecation warnings
@ -164,6 +164,6 @@ toolkit.
The SIP code generator understands the signal/slot type safe callback mechanism
that Qt uses to connect objects together. This allows applications to define
new Python signals, and allows any Python callable object to be used as a slot.
new Python Q_SIGNALS, and allows any Python callable object to be used as a slot.
SIP itself does not require Qt to be installed.

@ -130,15 +130,15 @@ file.
*class-variable* |
**public:** |
**public Q_SLOTS:** |
**public slots:** |
**public Q_SLOTS:** |
**protected:** |
**protected Q_SLOTS:** |
**protected slots:** |
**protected Q_SLOTS:** |
**private:** |
**private Q_SLOTS:** |
**private slots:** |
**private Q_SLOTS:** |
**Q_SIGNALS:** |
**signals:**]
**Q_SIGNALS:**]
*constructor* ::= [**explicit**] *name* **(** [*argument-list*] **)**
[*exceptions*] [*function-annotations*]

@ -284,7 +284,7 @@ previous examples.
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 a
hierachy. When an object is destroyed all of its children are also
hierachy. When an object is destroyed all of its tqchildren are also
automatically destroyed. It is important, therefore, that the Python
garbage collector doesn't also try and destroy them. This is covered in
more detail in :ref:`ref-object-ownership`. SIP provides many other
@ -552,8 +552,8 @@ Support for Wide Characters
---------------------------
SIP v4.6 introduced support for wide characters (i.e. the ``wchar_t`` type).
Python's C API includes support for converting between unicode objects and wide
character strings and arrays. When converting from a unicode object to wide
Python's C API includes support for converting between tqunicode objects and wide
character strings and arrays. When converting from a tqunicode object to wide
characters SIP creates the string or array on the heap (using memory allocated
using :cfunc:`sipMalloc()`). This then raises the problem of how this memory
is subsequently freed.

@ -3,7 +3,7 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* -- main layout ----------------------------------------------------------- */
/* -- main tqlayout ----------------------------------------------------------- */
div.clearer {
clear: both;

@ -5,7 +5,7 @@
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
/* -- page tqlayout ----------------------------------------------------------- */
body {
font-family: sans-serif;

@ -1039,7 +1039,7 @@ jQuery.extend({
// IE uses filters for opacity
if ( !jQuery.support.opacity && name == "opacity" ) {
if ( set ) {
// IE has trouble with opacity if it does not have layout
// IE has trouble with opacity if it does not have tqlayout
// Force it by setting the zoom level
elem.zoom = 1;
@ -1182,7 +1182,7 @@ jQuery.each({
nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
children: function(elem){return jQuery.sibling(elem.firstChild);},
tqchildren: function(elem){return jQuery.sibling(elem.firstChild);},
contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
}, function(name, fn){
jQuery.fn[ name ] = function( selector ) {
@ -1250,7 +1250,7 @@ jQuery.each({
empty: function() {
// Remove element nodes and prevent memory leaks
jQuery(this).children().remove();
jQuery(this).tqchildren().remove();
// Remove any remaining nodes
while ( this.firstChild )
@ -2202,7 +2202,7 @@ if ( document.querySelectorAll ) (function(){
var oldSizzle = Sizzle, div = document.createElement("div");
div.innerHTML = "<p class='TEST'></p>";
// Safari can't handle uppercase or unicode characters when
// Safari can't handle uppercase or tqunicode characters when
// in quirks mode.
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;

@ -82,16 +82,16 @@ within the range if it is greater or equal to the lower bound and less
than the upper bound. Each bound can be omitted meaning that the range is
unbounded in that direction.</p>
<p>For example:</p>
<div class="last highlight-python"><pre># This is part of the PyQt4 API up to but excluding v2.
void hex() /API=PyQt4:-2/
<div class="last highlight-python"><pre># This is part of the PyTQt4 API up to but excluding v2.
void hex() /API=PyTQt4:-2/
# This is part of the PyQt4 API starting from v2.
void hex() /PyName=hex_, API=PyQt4:2-/</pre>
# This is part of the PyTQt4 API starting from v2.
void hex() /PyName=hex_, API=PyTQt4:2-/</pre>
</div>
</dd>
</dl>
<p>The following example shows argument and function annotations:</p>
<div class="highlight-python"><pre>void exec(QWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/;</pre>
<div class="highlight-python"><pre>void exec(TQWidget * /Transfer/) /ReleaseGIL, PyName=call_exec/;</pre>
</div>
<p>Note that the current version of SIP does not complain about unknown
annotations, or annotations used out of their correct context.</p>
@ -191,7 +191,7 @@ directive. If the directive is not specified then <tt class="xref docutils lite
<p>Python v3 will use the <tt class="docutils literal"><span class="pre">bytes</span></tt> type to represent the argument if the
encoding is <tt class="docutils literal"><span class="pre">&quot;None&quot;</span></tt> and the <tt class="docutils literal"><span class="pre">str</span></tt> type otherwise.</p>
<p>Python v2 will use the <tt class="docutils literal"><span class="pre">str</span></tt> type to represent the argument if the
encoding is <tt class="docutils literal"><span class="pre">&quot;None&quot;</span></tt> and the <tt class="docutils literal"><span class="pre">unicode</span></tt> type otherwise.</p>
encoding is <tt class="docutils literal"><span class="pre">&quot;None&quot;</span></tt> and the <tt class="docutils literal"><span class="pre">tqunicode</span></tt> type otherwise.</p>
</dd></dl>
<dl class="argument-annotation">

@ -56,18 +56,18 @@ care of the details of particular combinations of platform and compiler. It
supports over 50 different platform/compiler combinations.</p>
<p>The build system is implemented as a pure Python module called <tt class="xref docutils literal"><span class="pre">sipconfig</span></tt>
that contains a number of classes and functions. Using this module you can
write bespoke configuration scripts (e.g. PyQt&#8217;s <tt class="docutils literal"><span class="pre">configure.py</span></tt>) or use it
write bespoke configuration scripts (e.g. PyTQt&#8217;s <tt class="docutils literal"><span class="pre">configure.py</span></tt>) or use it
with other Python based build systems (e.g.
<a class="reference external" href="http://www.python.org/sigs/distutils-sig/distutils.html">Distutils</a> and
<a class="reference external" href="http://www.scons.org">SCons</a>).</p>
<p>An important feature of SIP is the ability to generate bindings that are built
on top of existing bindings. For example, both
<a class="reference external" href="http://www.riverbankcomputing.com/software/pykde/">PyKDE</a> and
<a class="reference external" href="http://pyqwt.sourceforge.net/">PyQwt</a> are built on top of PyQt but all three
packages are maintained by different developers. To make this easier PyQt
<a class="reference external" href="http://pyqwt.sourceforge.net/">PyQwt</a> are built on top of PyTQt but all three
packages are maintained by different developers. To make this easier PyTQt
includes its own configuration module, <tt class="docutils literal"><span class="pre">pyqtconfig</span></tt>, that contains additional
classes intended to be used by the configuration scripts of bindings built on
top of PyQt. The SIP build system includes facilities that do a lot of the
top of PyTQt. The SIP build system includes facilities that do a lot of the
work of creating these additional configuration modules.</p>
<dl class="function">
<dt id="sipconfig.create_config_module">
@ -551,12 +551,12 @@ and <tt class="docutils literal"><span class="pre">BMAKE</span></tt>.</dd></dl>
<a title="sipconfig.Configuration" class="reference internal" href="#sipconfig.Configuration"><tt class="xref docutils literal"><span class="pre">Configuration</span></tt></a> class or a sub-class.</li>
<li><em>console</em> &#8211; is set if the target is a console (rather than GUI) target. This
only affects Windows and is ignored on other platforms.</li>
<li><em>qt</em> &#8211; is set if the target uses Qt. For Qt v4 a list of Qt libraries may
be specified and a simple non-zero value implies QtCore and QtGui.</li>
<li><em>qt</em> &#8211; is set if the target uses TQt. For TQt v4 a list of TQt libraries may
be specified and a simple non-zero value implies TQtCore and TQtGui.</li>
<li><em>opengl</em> &#8211; is set if the target uses OpenGL.</li>
<li><em>python</em> &#8211; is set if the target uses Python.h.</li>
<li><em>threaded</em> &#8211; is set if the target requires thread support. It is set
automatically if the target uses Qt and Qt has thread support
automatically if the target uses TQt and TQt has thread support
enabled.</li>
<li><em>warnings</em> &#8211; is set if compiler warning messages should be enabled. The default
of <tt class="xref docutils literal"><span class="pre">None</span></tt> means that warnings are enabled for SIP v4.x and

@ -261,12 +261,12 @@ the result is <tt class="docutils literal"><span class="pre">Py_None</span></tt>
<dd>Convert a C/C++ <tt class="docutils literal"><span class="pre">unsigned</span> <span class="pre">short</span></tt> to a Python long.</dd>
<dt><tt class="docutils literal"><span class="pre">u</span></tt> (long) [unsigned int]</dt>
<dd>Convert a C/C++ <tt class="docutils literal"><span class="pre">unsigned</span> <span class="pre">int</span></tt> to a Python long.</dd>
<dt><tt class="docutils literal"><span class="pre">w</span></tt> (unicode/string) [wchar_t]</dt>
<dd>Convert a C/C++ wide character to a Python v2 unicode object or a
<dt><tt class="docutils literal"><span class="pre">w</span></tt> (tqunicode/string) [wchar_t]</dt>
<dd>Convert a C/C++ wide character to a Python v2 tqunicode object or a
Python v3 string object.</dd>
<dt><tt class="docutils literal"><span class="pre">x</span></tt> (unicode/string) [wchar_t *]</dt>
<dt><tt class="docutils literal"><span class="pre">x</span></tt> (tqunicode/string) [wchar_t *]</dt>
<dd>Convert a C/C++ <tt class="docutils literal"><span class="pre">L'\0'</span></tt> terminated wide character string to a Python
v2 unicode object or a Python v3 string object. If the string pointer
v2 tqunicode object or a Python v3 string object. If the string pointer
is <tt class="docutils literal"><span class="pre">NULL</span></tt> then the result is <tt class="docutils literal"><span class="pre">Py_None</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">A</span></tt> (string) [char *]</dt>
<dd>Convert a C/C++ <tt class="docutils literal"><span class="pre">'\0'</span></tt> terminated string to a Python v2 or v3 string
@ -329,8 +329,8 @@ Python named enum type.</p>
<dt><tt class="docutils literal"><span class="pre">F</span></tt> (wrapped enum) [enum, <tt class="xref docutils literal"><span class="pre">sipTypeDef</span></tt> *]</dt>
<dd>Convert a named C/C++ <tt class="docutils literal"><span class="pre">enum</span></tt> to an instance of the corresponding
Python named enum type.</dd>
<dt><tt class="docutils literal"><span class="pre">G</span></tt> (unicode) [wchar_t *, <a title="SIP_SSIZE_T" class="reference internal" href="#SIP_SSIZE_T"><tt class="xref docutils literal"><span class="pre">SIP_SSIZE_T</span></tt></a>]</dt>
<dd>Convert a C/C++ wide character array and its length to a Python unicode
<dt><tt class="docutils literal"><span class="pre">G</span></tt> (tqunicode) [wchar_t *, <a title="SIP_SSIZE_T" class="reference internal" href="#SIP_SSIZE_T"><tt class="xref docutils literal"><span class="pre">SIP_SSIZE_T</span></tt></a>]</dt>
<dd>Convert a C/C++ wide character array and its length to a Python tqunicode
object. If the array is <tt class="docutils literal"><span class="pre">NULL</span></tt> then the length is ignored and the
result is <tt class="docutils literal"><span class="pre">Py_None</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">N</span></tt> (wrapped instance) [<em>type</em> *, <tt class="xref docutils literal"><span class="pre">sipTypeDef</span></tt> *, PyObject *]</dt>
@ -1428,7 +1428,7 @@ to be passed.</p>
<dd>Convert a Python string-like object of length 1 to a C/C++ <tt class="docutils literal"><span class="pre">char</span></tt>
according to the encoding <tt class="docutils literal"><span class="pre">e</span></tt>. <tt class="docutils literal"><span class="pre">e</span></tt> can either be <tt class="docutils literal"><span class="pre">A</span></tt> for ASCII,
<tt class="docutils literal"><span class="pre">L</span></tt> for Latin-1, or <tt class="docutils literal"><span class="pre">8</span></tt> for UTF-8. For Python v2 the object may be
either a string or a unicode object that can be encoded. For Python v3
either a string or a tqunicode object that can be encoded. For Python v3
the object may either be a bytes object or a string object that can be
encoded. An object that supports the buffer protocol may also be used.</dd>
<dt><tt class="docutils literal"><span class="pre">b</span></tt> (integer) [bool *]</dt>
@ -1472,11 +1472,11 @@ then the string is <tt class="docutils literal"><span class="pre">NULL</span></t
<dd>Convert a Python long to a C/C++ <tt class="docutils literal"><span class="pre">unsigned</span> <span class="pre">short</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">u</span></tt> (long) [unsigned int *]</dt>
<dd>Convert a Python long to a C/C++ <tt class="docutils literal"><span class="pre">unsigned</span> <span class="pre">int</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">w</span></tt> (unicode/string) [wchar_t *]</dt>
<dd>Convert a Python v2 string or unicode object or a Python v3 string
<dt><tt class="docutils literal"><span class="pre">w</span></tt> (tqunicode/string) [wchar_t *]</dt>
<dd>Convert a Python v2 string or tqunicode object or a Python v3 string
object of length 1 to a C/C++ wide character.</dd>
<dt><tt class="docutils literal"><span class="pre">x</span></tt> (unicode/string) [wchar_t **]</dt>
<dd>Convert a Python v2 string or unicode object or a Python v3 string
<dt><tt class="docutils literal"><span class="pre">x</span></tt> (tqunicode/string) [wchar_t **]</dt>
<dd>Convert a Python v2 string or tqunicode object or a Python v3 string
object to a C/C++ <tt class="docutils literal"><span class="pre">L'\0'</span></tt> terminated wide character string. If the
Python object is <tt class="docutils literal"><span class="pre">Py_None</span></tt> then the string is <tt class="docutils literal"><span class="pre">NULL</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">Ae</span></tt> (object) [int, const char **]</dt>
@ -1487,7 +1487,7 @@ ASCII, <tt class="docutils literal"><span class="pre">L</span></tt> for Latin-1,
identifies the object in the context defined by the <tt class="docutils literal"><span class="pre">S</span></tt> format
character and allows an extra reference to the object to be kept to
ensure that the string remains valid. For Python v2 the object may be
either a string or a unicode object that can be encoded. For Python v3
either a string or a tqunicode object that can be encoded. For Python v3
the object may either be a bytes object or a string object that can be
encoded. An object that supports the buffer protocol may also be used.</dd>
<dt><tt class="docutils literal"><span class="pre">B</span></tt> (string/bytes) [int, const char **]</dt>
@ -1548,8 +1548,8 @@ not passed if this flag is specified.</dd>
</dd>
<dt><tt class="docutils literal"><span class="pre">F</span></tt> (wrapped enum) [<tt class="xref docutils literal"><span class="pre">sipTypeDef</span></tt> *, enum *]</dt>
<dd>Convert a Python named enum type to the corresponding C/C++ <tt class="docutils literal"><span class="pre">enum</span></tt>.</dd>
<dt><tt class="docutils literal"><span class="pre">G</span></tt> (unicode/string) [wchar_t **, <a title="SIP_SSIZE_T" class="reference internal" href="#SIP_SSIZE_T"><tt class="xref docutils literal"><span class="pre">SIP_SSIZE_T</span></tt></a> *]</dt>
<dd>Convert a Python v2 string or unicode object or a Python v3 string
<dt><tt class="docutils literal"><span class="pre">G</span></tt> (tqunicode/string) [wchar_t **, <a title="SIP_SSIZE_T" class="reference internal" href="#SIP_SSIZE_T"><tt class="xref docutils literal"><span class="pre">SIP_SSIZE_T</span></tt></a> *]</dt>
<dd>Convert a Python v2 string or tqunicode object or a Python v3 string
object to a C/C++ wide character array and its length. If the Python
object is <tt class="docutils literal"><span class="pre">Py_None</span></tt> then the array and length are <tt class="docutils literal"><span class="pre">NULL</span></tt> and zero
respectively.</dd>
@ -2080,7 +2080,7 @@ corresponding generated type structure (see <a class="reference internal" href="
name prefixed by <tt class="docutils literal"><span class="pre">sip</span></tt>. For example, the derived class for class <tt class="docutils literal"><span class="pre">Klass</span></tt>
is <tt class="docutils literal"><span class="pre">sipKlass</span></tt>.</p>
<p>If a C++ class doesn&#8217;t have any virtual or protected methods in it or any of
it&#8217;s super-class hierarchy, or does not emit any Qt signals, then a derived
it&#8217;s super-class hierarchy, or does not emit any TQt signals, then a derived
class is not generated.</p>
<p>Most of the time handwritten code should ignore the derived classes. The only
exception is that handwritten constructor code specified using the

@ -70,8 +70,8 @@ is omitted then <tt class="docutils literal"><span class="pre">stdin</span></tt>
<dl class="cmdoption">
<dt id="cmdoption-sip-a">
<tt class="descname">-a</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-sip-a" title="Permalink to this definition"></a></dt>
<dd>The name of the QScintilla API file to generate. This file contains a
description of the module API in a form that the QScintilla editor
<dd>The name of the TQScintilla API file to generate. This file contains a
description of the module API in a form that the TQScintilla editor
component can use for auto-completion and call tips. (The file may also be
used by the SciTE editor but must be sorted first.) By default the file is
not generated.</dd></dl>

@ -100,7 +100,7 @@ Klass *klassInstance;
version number must be greater than or equal to 1.</p>
<p>See <a class="reference external" href="using.html#ref-incompat-apis"><em>Managing Incompatible APIs</em></a> for more detail.</p>
<p>For example:</p>
<div class="highlight-python"><pre>%API PyQt4 1</pre>
<div class="highlight-python"><pre>%API PyTQt4 1</pre>
</div>
<dl class="directive">
<dt id="directive-%BIGetBufferCode">
@ -313,9 +313,9 @@ same name.</p>
subsequent <a class="reference internal" href="#directive-%CModule"><tt class="xref docutils literal"><span class="pre">%CModule</span></tt></a> or <a class="reference internal" href="#directive-%Module"><tt class="xref docutils literal"><span class="pre">%Module</span></tt></a> directive is
interpreted as defining a component module.</p>
<p>For example:</p>
<div class="highlight-python"><pre>%CompositeModule PyQt4.Qt
%Include QtCore/QtCoremod.sip
%Include QtGui/QtGuimod.sip</pre>
<div class="highlight-python"><pre>%CompositeModule PyTQt4.TQt
%Include TQtCore/TQtCoremod.sip
%Include TQtGui/TQtGuimod.sip</pre>
</div>
<p>The main purpose of a composite module is as a programmer convenience as they
don&#8217;t have to remember which which individual module an object is defined in.</p>
@ -333,9 +333,9 @@ SIP generated modules (refered to as component modules in this context).</p>
subsequent <a class="reference internal" href="#directive-%CModule"><tt class="xref docutils literal"><span class="pre">%CModule</span></tt></a> or <a class="reference internal" href="#directive-%Module"><tt class="xref docutils literal"><span class="pre">%Module</span></tt></a> directive is
interpreted as defining a component module.</p>
<p>For example:</p>
<div class="highlight-python"><pre>%ConsolidatedModule PyQt4._qt
%Include QtCore/QtCoremod.sip
%Include QtGui/QtGuimod.sip</pre>
<div class="highlight-python"><pre>%ConsolidatedModule PyTQt4._qt
%Include TQtCore/TQtCoremod.sip
%Include TQtGui/TQtGuimod.sip</pre>
</div>
<p>A consolidated module is not intended to be explicitly imported by an
application. Instead it is imported by its component modules when they
@ -380,8 +380,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&lt;QWidget</span> <span class="pre">*&gt;</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">TQList&lt;TQWidget</span> <span class="pre">*&gt;</span></tt> instance to a Python
list of <tt class="docutils literal"><span class="pre">TQWidget</span></tt> instances:</p>
<div class="highlight-python"><pre>%ConvertFromTypeCode
PyObject *l;
@ -390,15 +390,15 @@ 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 &lt; sipCpp-&gt;size(); ++i)
{
QWidget *w = sipCpp-&gt;at(i);
TQWidget *w = sipCpp-&gt;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 = sipConvertFromType(w, sipType_QWidget, sipTransferObj)) == NULL)
if ((wobj = sipConvertFromType(w, sipType_TQWidget, sipTransferObj)) == NULL)
{
// There was an error so garbage collect the Python list.
Py_DECREF(l);
@ -469,21 +469,21 @@ it can.</p>
</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
class hierarchy in PyQt:</p>
<div class="highlight-python"><pre>class QEvent
<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 PyTQt:</p>
<div class="highlight-python"><pre>class TQEvent
{
%ConvertToSubClassCode
// QEvent sub-classes provide a unique type ID.
// TQEvent sub-classes provide a unique type ID.
switch (sipCpp-&gt;type())
{
case QEvent::Timer:
sipType = sipType_QTimerEvent;
case TQEvent::Timer:
sipType = sipType_TQTimerEvent;
break;
case QEvent::KeyPress:
case QEvent::KeyRelease:
sipType = sipType_QKeyEvent;
case TQEvent::KeyPress:
case TQEvent::KeyRelease:
sipType = sipType_TQKeyEvent;
break;
// Skip the remaining event types to keep the example short.
@ -514,9 +514,9 @@ used as part of the <a class="reference internal" href="#directive-%MappedType">
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>
additional types of Python object. For example, PyTQt uses it in the
specification of the <tt class="docutils literal"><span class="pre">TQString</span></tt> class to allow Python string objects and
tqunicode 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>
@ -554,8 +554,8 @@ returned instance is a derived class. See
<a class="reference external" href="c_api.html#ref-derived-classes"><em>Generated Derived Classes</em></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&lt;QPoint&gt;</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">TQList&lt;TQPoint&gt;</span></tt> instance:</p>
<div class="highlight-python"><pre>%ConvertToTypeCode
// See if we are just being asked to check the type of the Python
// object.
@ -567,11 +567,11 @@ returned instance is a derived class. See
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 &lt; PyList_GET_SIZE(sipPy); ++i)
if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i),
sipType_QPoint, SIP_NOT_NONE))
sipType_TQPoint, SIP_NOT_NONE))
return 0;
// The type is valid.
@ -579,26 +579,26 @@ returned instance is a derived class. See
}
// Create the instance on the heap.
QList&lt;QPoint&gt; *ql = new QList&lt;QPoint&gt;;
TQList&lt;TQPoint&gt; *ql = new TQList&lt;TQPoint&gt;;
for (int i = 0; i &lt; 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&lt;QPoint *&gt;(sipConvertToType(
qp = reinterpret_cast&lt;TQPoint *&gt;(sipConvertToType(
PyList_GET_ITEM(sipPy, i),
sipType_QPoint, 0,
sipType_TQPoint, 0,
SIP_NOT_NONE,
&amp;state, sipIsErr));
// Deal with any errors.
if (*sipIsErr)
{
sipReleaseType(qp, sipType_QPoint, state);
sipReleaseType(qp, sipType_TQPoint, state);
// Tidy up.
delete ql;
@ -609,11 +609,11 @@ returned instance is a derived class. See
ql-&gt;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.
// sipReleaseType() will do the right thing.
sipReleaseType(qp, sipType_QPoint, state);
sipReleaseType(qp, sipType_TQPoint, state);
}
// Return the instance.
@ -685,7 +685,7 @@ modules, that doesn&#8217;t have an explicit meta-type.</p>
meta-type used by a particular C/C++ type.</p>
<p>See the section <a class="reference external" href="using.html#ref-types-metatypes"><em>Types and Meta-types</em></a> for more details.</p>
<p>For example:</p>
<div class="highlight-python"><pre>%DefaultMetatype PyQt4.QtCore.pyqtWrapperType</pre>
<div class="highlight-python"><pre>%DefaultMetatype PyTQt4.TQtCore.pyqtWrapperType</pre>
</div>
<dl class="directive">
<dt id="directive-%DefaultSupertype">
@ -916,8 +916,8 @@ 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>
class allows arbitary data to be attached to the event. In PyQt this data is
<p>The following simplified example is taken from PyTQt. The <tt class="docutils literal"><span class="pre">TQCustomEvent</span></tt>
class allows arbitary data to be attached to the event. In PyTQt this data is
always a Python object and so should be handled by the garbage collector:</p>
<div class="highlight-python"><pre>%GCClearCode
PyObject *obj;
@ -961,7 +961,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&#8217;s <tt class="docutils literal"><span class="pre">QCustomEvent</span></tt> class:</p>
<p>The following simplified example is taken from PyTQt&#8217;s <tt class="docutils literal"><span class="pre">TQCustomEvent</span></tt> class:</p>
<div class="highlight-python"><pre>%GCTraverseCode
PyObject *obj;
@ -1245,7 +1245,7 @@ the handwritten code that converts an instance of the mapped type to a Python
object.</p>
<p>For example:</p>
<div class="highlight-python"><pre>template&lt;Type *&gt;
%MappedType QList
%MappedType TQList
{
%TypeHeaderCode
// Include the library interface to the type being mapped.
@ -1272,7 +1272,7 @@ object.</p>
}
// Create the instance on the heap.
QList&lt;Type *&gt; *ql = new QList&lt;Type *&gt;;
TQList&lt;Type *&gt; *ql = new TQList&lt;Type *&gt;;
for (int i = 0; i &lt; PyList_GET_SIZE(sipPy); ++i)
{
@ -1333,9 +1333,9 @@ object.</p>
%End
}</pre>
</div>
<p>Using this we can use, for example, <tt class="docutils literal"><span class="pre">QList&lt;QObject</span> <span class="pre">*&gt;</span></tt> throughout the
<p>Using this we can use, for example, <tt class="docutils literal"><span class="pre">TQList&lt;TQObject</span> <span class="pre">*&gt;</span></tt> throughout the
module&#8217;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
generated code will automatically map this to and from a Python list of TQObject
instances when appropriate.</p>
<dl class="directive">
<dt id="directive-%MethodCode">

@ -569,7 +569,7 @@
<dt><a href="command_line.html#cmdoption-sip-x">-x &lt;FEATURE&gt;</a></dt>
<dt><a href="command_line.html#cmdoption-sip-z">-z &lt;FILE&gt;</a></dt>
</dl></dd>
<dt><a href="specification_files.html#stype-SIP_ANYSLOT">SIP_ANYSLOT (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_ANYSLOT">SIP_ANYTQT_SLOT (SIP type)</a></dt>
<dt><a href="c_api.html#SIP_API_MAJOR_NR">SIP_API_MAJOR_NR (C macro)</a></dt>
<dt><a href="c_api.html#SIP_API_MINOR_NR">SIP_API_MINOR_NR (C macro)</a></dt>
<dt><a href="build_system.html#sipconfig.Configuration.sip_bin">sip_bin (sipconfig.Configuration attribute)</a></dt>
@ -587,7 +587,7 @@
<dt><a href="specification_files.html#stype-SIP_PYSLICE">SIP_PYSLICE (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_PYTUPLE">SIP_PYTUPLE (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_PYTYPE">SIP_PYTYPE (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_QOBJECT">SIP_QOBJECT (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_TQOBJECT">SIP_TQOBJECT (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_RXOBJ_CON">SIP_RXOBJ_CON (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_RXOBJ_DIS">SIP_RXOBJ_DIS (SIP type)</a></dt>
<dt><a href="specification_files.html#stype-SIP_SIGNAL">SIP_SIGNAL (SIP type)</a></dt>

@ -102,8 +102,8 @@ from <a title="sipBuildResult" class="reference external" href="c_api.html#sipBu
been removed.</p>
</div>
<div class="section" id="removal-of-pyqt-specific-features">
<h3>Removal of PyQt-specific Features<a class="headerlink" href="#removal-of-pyqt-specific-features" title="Permalink to this headline"></a></h3>
<p>The following PyQt-specific support functions have been removed.</p>
<h3>Removal of PyTQt-specific Features<a class="headerlink" href="#removal-of-pyqt-specific-features" title="Permalink to this headline"></a></h3>
<p>The following PyTQt-specific support functions have been removed.</p>
<ul class="simple">
<li><tt class="xref docutils literal"><span class="pre">sipConnectRx()</span></tt></li>
<li><tt class="xref docutils literal"><span class="pre">sipDisconnectRx()</span></tt></li>
@ -210,7 +210,7 @@ still supported).</p>
<li><a class="reference external" href="#truediv">__truediv__</a></li>
<li><a class="reference external" href="#sipwrapper-user-member">sipWrapper user Member</a></li>
<li><a class="reference external" href="#removal-of-previously-deprecated-features">Removal of Previously Deprecated Features</a></li>
<li><a class="reference external" href="#removal-of-pyqt-specific-features">Removal of PyQt-specific Features</a></li>
<li><a class="reference external" href="#removal-of-pyqt-specific-features">Removal of PyTQt-specific Features</a></li>
<li><a class="reference external" href="#id1">Newly Deprecated Features</a></li>
</ul>
</li>

@ -51,7 +51,7 @@
<li class="toctree-l2"><a class="reference external" href="introduction.html#license">License</a></li>
<li class="toctree-l2"><a class="reference external" href="introduction.html#features">Features</a></li>
<li class="toctree-l2"><a class="reference external" href="introduction.html#sip-components">SIP Components</a></li>
<li class="toctree-l2"><a class="reference external" href="introduction.html#qt-support">Qt Support</a></li>
<li class="toctree-l2"><a class="reference external" href="introduction.html#qt-support">TQt Support</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="incompatibilities.html">Potential Incompatibilities with Earlier Versions</a><ul>

@ -53,8 +53,8 @@
<p>This is the reference guide for SIP 4.10.5. SIP is a tool for
automatically generating <a class="reference external" href="http://www.python.org">Python</a> bindings for C and
C++ libraries. SIP was originally developed in 1998 for
<a class="reference external" href="http://www.riverbankcomputing.com/software/pyqt">PyQt</a> - the Python
bindings for the Qt GUI toolkit - but is suitable for generating bindings for
<a class="reference external" href="http://www.riverbankcomputing.com/software/pyqt">PyTQt</a> - the Python
bindings for the TQt GUI toolkit - but is suitable for generating bindings for
any C or C++ library.</p>
<p>This version of SIP generates bindings for Python v2.3 or later, including
Python v3.</p>
@ -163,13 +163,13 @@ needed to build the extension module. It is covered in detail in
</ul>
</div>
<div class="section" id="qt-support">
<h2>Qt Support<a class="headerlink" href="#qt-support" title="Permalink to this headline"></a></h2>
<p>SIP has specific support for the creation of bindings based on Nokia&#8217;s Qt
<h2>TQt Support<a class="headerlink" href="#qt-support" title="Permalink to this headline"></a></h2>
<p>SIP has specific support for the creation of bindings based on Nokia&#8217;s TQt
toolkit.</p>
<p>The SIP code generator understands the signal/slot type safe callback mechanism
that Qt uses to connect objects together. This allows applications to define
that TQt uses to connect objects together. This allows applications to define
new Python signals, and allows any Python callable object to be used as a slot.</p>
<p>SIP itself does not require Qt to be installed.</p>
<p>SIP itself does not require TQt to be installed.</p>
</div>
</div>
@ -185,7 +185,7 @@ new Python signals, and allows any Python callable object to be used as a slot.<
<li><a class="reference external" href="#license">License</a></li>
<li><a class="reference external" href="#features">Features</a></li>
<li><a class="reference external" href="#sip-components">SIP Components</a></li>
<li><a class="reference external" href="#qt-support">Qt Support</a></li>
<li><a class="reference external" href="#qt-support">TQt Support</a></li>
</ul>
</li>
</ul>

File diff suppressed because one or more lines are too long

@ -171,15 +171,15 @@ file.</p>
<em>virtual-operator</em> |
<em>class-variable</em> |
<strong>public:</strong> |
<strong>public Q_SLOTS:</strong> |
<strong>public slots:</strong> |
<strong>public slots:</strong> |
<strong>protected:</strong> |
<strong>protected Q_SLOTS:</strong> |
<strong>protected slots:</strong> |
<strong>protected slots:</strong> |
<strong>private:</strong> |
<strong>private Q_SLOTS:</strong> |
<strong>private slots:</strong> |
<strong>Q_SIGNALS:</strong> |
<strong>private slots:</strong> |
<strong>signals:</strong> |
<strong>signals:</strong>]
<em>constructor</em> ::= [<strong>explicit</strong>] <em>name</em> <strong>(</strong> [<em>argument-list</em>] <strong>)</strong>
@ -193,7 +193,7 @@ file.</p>
[<em>function-annotations</em>] <strong>;</strong> [<a class="reference external" href="directives.html#directive-%MethodCode"><tt class="xref docutils literal"><span class="pre">%MethodCode</span></tt></a>]
[<a class="reference external" href="directives.html#directive-%VirtualCatcherCode"><tt class="xref docutils literal"><span class="pre">%VirtualCatcherCode</span></tt></a>]
<em>method</em> ::= [<strong>Q_SIGNAL</strong>] [<strong>Q_SLOT</strong>] <em>type</em> <em>name</em> <strong>(</strong>
<em>method</em> ::= [<strong>TQ_SIGNAL</strong>] [<strong>TQ_SLOT</strong>] <em>type</em> <em>name</em> <strong>(</strong>
[<em>argument-list</em>] <strong>)</strong> [<strong>const</strong>] [<em>exceptions</em>] [<strong>= 0</strong>]
[<em>function-annotations</em>] [<em>c++-signature</em>] <strong>;</strong>
[<a class="reference external" href="directives.html#directive-%Docstring"><tt class="xref docutils literal"><span class="pre">%Docstring</span></tt></a>] [<a class="reference external" href="directives.html#directive-%MethodCode"><tt class="xref docutils literal"><span class="pre">%MethodCode</span></tt></a>]
@ -202,7 +202,7 @@ file.</p>
<em>static-method</em> ::= <strong>static</strong> <em>function</em>
<em>virtual-method</em> ::= [<strong>Q_SIGNAL</strong>] [<strong>Q_SLOT</strong>] <strong>virtual</strong> <em>type</em> <em>name</em>
<em>virtual-method</em> ::= [<strong>TQ_SIGNAL</strong>] [<strong>TQ_SLOT</strong>] <strong>virtual</strong> <em>type</em> <em>name</em>
<strong>(</strong> [<em>argument-list</em>] <strong>)</strong> [<strong>const</strong>] [<em>exceptions</em>] [<strong>= 0</strong>]
[<em>function-annotations</em>] [<em>c++-signature</em>] <strong>;</strong>
[<a class="reference external" href="directives.html#directive-%MethodCode"><tt class="xref docutils literal"><span class="pre">%MethodCode</span></tt></a>] [<a class="reference external" href="directives.html#directive-%VirtualCatcherCode"><tt class="xref docutils literal"><span class="pre">%VirtualCatcherCode</span></tt></a>]
@ -310,7 +310,7 @@ file.</p>
<em>argument</em> ::= [
<em>type</em> [<em>name</em>] [<em>argument-annotations</em>] [<em>default-value</em>] |
<a class="reference internal" href="#stype-SIP_ANYSLOT"><tt class="xref docutils literal"><span class="pre">SIP_ANYSLOT</span></tt></a> [<em>default-value</em>] |
<a class="reference internal" href="#stype-SIP_QOBJECT"><tt class="xref docutils literal"><span class="pre">SIP_QOBJECT</span></tt></a> |
<a class="reference internal" href="#stype-SIP_TQOBJECT"><tt class="xref docutils literal"><span class="pre">SIP_TQOBJECT</span></tt></a> |
<a class="reference internal" href="#stype-SIP_RXOBJ_CON"><tt class="xref docutils literal"><span class="pre">SIP_RXOBJ_CON</span></tt></a> |
<a class="reference internal" href="#stype-SIP_RXOBJ_DIS"><tt class="xref docutils literal"><span class="pre">SIP_RXOBJ_DIS</span></tt></a> |
<a class="reference internal" href="#stype-SIP_SIGNAL"><tt class="xref docutils literal"><span class="pre">SIP_SIGNAL</span></tt></a> [<em>default-value</em>] |
@ -467,28 +467,28 @@ Handwritten code must be provided to interpret the conversion correctly.</p>
<p>This is a <tt class="docutils literal"><span class="pre">PyObject</span> <span class="pre">*</span></tt> that is a Python type object.</p>
<dl class="sip-type">
<dt id="stype-SIP_QOBJECT">
<tt class="descname">SIP_QOBJECT</tt><a class="headerlink" href="#stype-SIP_QOBJECT" title="Permalink to this definition"></a></dt>
<dt id="stype-SIP_TQOBJECT">
<tt class="descname">SIP_TQOBJECT</tt><a class="headerlink" href="#stype-SIP_TQOBJECT" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<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&#8217;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 TQt&#8217;s
<tt class="docutils literal"><span class="pre">TQObject</span></tt> class.</p>
<dl class="sip-type">
<dt id="stype-SIP_RXOBJ_CON">
<tt class="descname">SIP_RXOBJ_CON</tt><a class="headerlink" href="#stype-SIP_RXOBJ_CON" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<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&#8217;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 TQt&#8217;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>
<dl class="sip-type">
<dt id="stype-SIP_RXOBJ_DIS">
<tt class="descname">SIP_RXOBJ_DIS</tt><a class="headerlink" href="#stype-SIP_RXOBJ_DIS" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<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&#8217;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 TQt&#8217;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>
<dl class="sip-type">
<dt id="stype-SIP_SIGNAL">
<tt class="descname">SIP_SIGNAL</tt><a class="headerlink" href="#stype-SIP_SIGNAL" title="Permalink to this definition"></a></dt>
@ -514,11 +514,11 @@ 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>
<div class="highlight-python"><pre>bool connectItem(int id, const QObject *receiver, const char *member);</pre>
<div class="highlight-python"><pre>bool connectItem(int id, const TQObject *receiver, const char *member);</pre>
</div>
<p>The corresponding SIP specification is:</p>
<div class="highlight-python"><pre>bool connectItem(int, SIP_RXOBJ_CON, SIP_SLOT_CON(int));</pre>

@ -235,13 +235,13 @@ be used for this example without change.</p>
<div class="section" id="a-more-complex-c-example">
<h2>A More Complex C++ Example<a class="headerlink" href="#a-more-complex-c-example" title="Permalink to this headline"></a></h2>
<p>In this last example we will wrap a fictional C++ library that contains a class
that is derived from a Qt class. This will demonstrate how SIP allows a class
that is derived from a TQt class. This will demonstrate how SIP allows a class
hierarchy to be split across multiple Python extension modules, and will
introduce SIP&#8217;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&#8217;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
TQt&#8217;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&#8217;ll also say that the library only supports Qt v4.2 and later,
interesting we&#8217;ll also say that the library only supports TQt v4.2 and later,
and also includes a function called <tt class="docutils literal"><span class="pre">setDefault()</span></tt> that is not implemented
in the Windows version of the library.</p>
<p>The <tt class="docutils literal"><span class="pre">hello.h</span></tt> header file looks something like this:</p>
@ -251,12 +251,13 @@ in the Windows version of the library.</p>
#include &lt;qwidget.h&gt;
#include &lt;qstring.h&gt;
class Hello : public QLabel {
// This is needed by the Qt Meta-Object Compiler.
class Hello : public TQLabel {
// This is needed by the TQt Meta-Object Compiler.
Q_OBJECT
TQ_OBJECT
public:
Hello(QWidget *parent = 0);
Hello(TQWidget *parent = 0);
private:
// Prevent instances from being copied.
@ -265,7 +266,7 @@ private:
};
#if !defined(Q_OS_WIN)
void setDefault(const QString &amp;def);
void setDefault(const TQString &amp;def);
#endif</pre>
</div>
<p>The corresponding SIP specification file would then look something like this:</p>
@ -273,25 +274,25 @@ void setDefault(const QString &amp;def);
%Module hello 0
%Import QtGui/QtGuimod.sip
%Import TQtGui/TQtGuimod.sip
%If (Qt_4_2_0 -)
%If (TQt_4_2_0 -)
class Hello : QLabel {
class Hello : TQLabel {
%TypeHeaderCode
#include &lt;hello.h&gt;
%End
public:
Hello(QWidget *parent /TransferThis/ = 0);
Hello(TQWidget *parent /TransferThis/ = 0);
private:
Hello(const Hello &amp;);
};
%If (!WS_WIN)
void setDefault(const QString &amp;def);
void setDefault(const TQString &amp;def);
%End
%End</pre>
@ -301,12 +302,12 @@ previous examples.</p>
<blockquote>
<ul class="simple">
<li>The <a class="reference external" href="directives.html#directive-%Import"><tt class="xref docutils literal"><span class="pre">%Import</span></tt></a> directive has been added to specify that we are
extending the class hierarchy defined in the file <tt class="docutils literal"><span class="pre">QtGui/QtGuimod.sip</span></tt>.
This file is part of PyQt. The build system will take care of finding
extending the class hierarchy defined in the file <tt class="docutils literal"><span class="pre">TQtGui/TQtGuimod.sip</span></tt>.
This file is part of PyTQt. The build system will take care of finding
the file&#8217;s exact location.</li>
<li>The <a class="reference external" href="directives.html#directive-%If"><tt class="xref docutils literal"><span class="pre">%If</span></tt></a> directive has been added to specify that everything
<a class="footnote-reference" href="#id11" id="id8">[4]</a> up to the matching <a class="reference external" href="directives.html#directive-%End"><tt class="xref docutils literal"><span class="pre">%End</span></tt></a> directive only applies to Qt
v4.2 and later. <tt class="docutils literal"><span class="pre">Qt_4_2_0</span></tt> is a <em>tag</em> defined in <tt class="docutils literal"><span class="pre">QtCoremod.sip</span></tt>
<a class="footnote-reference" href="#id11" id="id8">[4]</a> up to the matching <a class="reference external" href="directives.html#directive-%End"><tt class="xref docutils literal"><span class="pre">%End</span></tt></a> directive only applies to TQt
v4.2 and later. <tt class="docutils literal"><span class="pre">TQt_4_2_0</span></tt> is a <em>tag</em> defined in <tt class="docutils literal"><span class="pre">TQtCoremod.sip</span></tt>
<a class="footnote-reference" href="#id12" id="id9">[5]</a> using the <a class="reference external" href="directives.html#directive-%Timeline"><tt class="xref docutils literal"><span class="pre">%Timeline</span></tt></a> directive. <a class="reference external" href="directives.html#directive-%Timeline"><tt class="xref docutils literal"><span class="pre">%Timeline</span></tt></a>
is used to define a tag for each version of a library&#8217;s API you are
wrapping allowing you to maintain all the different versions in a single
@ -318,9 +319,9 @@ removed. This is not supported by SIP.</li>
<li>The <a class="reference external" href="annotations.html#aanno-TransferThis"><tt class="xref docutils literal"><span class="pre">TransferThis</span></tt></a> annotation has been added to the constructor&#8217;s
argument. 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 a
hierachy. When an object is destroyed all of its children are also
is transferred from Python to C++. It is needed because TQt 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 tqchildren are also
automatically destroyed. It is important, therefore, that the Python
garbage collector doesn&#8217;t also try and destroy them. This is covered in
more detail in <a class="reference internal" href="#ref-object-ownership"><em>Ownership of Objects</em></a>. SIP provides many other
@ -331,7 +332,7 @@ values.</li>
SIP.</li>
<li>The <a class="reference external" href="directives.html#directive-%If"><tt class="xref docutils literal"><span class="pre">%If</span></tt></a> directive has been added to specify that everything
up to the matching <a class="reference external" href="directives.html#directive-%End"><tt class="xref docutils literal"><span class="pre">%End</span></tt></a> directive does not apply to Windows.
<tt class="docutils literal"><span class="pre">WS_WIN</span></tt> is another tag defined by PyQt, this time using the
<tt class="docutils literal"><span class="pre">WS_WIN</span></tt> is another tag defined by PyTQt, this time using the
<a class="reference external" href="directives.html#directive-%Platforms"><tt class="xref docutils literal"><span class="pre">%Platforms</span></tt></a> directive. Tags defined by the
<a class="reference external" href="directives.html#directive-%Platforms"><tt class="xref docutils literal"><span class="pre">%Platforms</span></tt></a> directive are mutually exclusive, i.e. only one
may be valid at a time <a class="footnote-reference" href="#id13" id="id10">[6]</a>.</li>
@ -342,9 +343,9 @@ copy constructor when it can never be called from Python? The answer is to
prevent the automatic generation of a public copy constructor.</p>
<p>We now look at the <tt class="docutils literal"><span class="pre">configure.py</span></tt> script. This is a little different to the
script in the previous examples for two related reasons.</p>
<p>Firstly, PyQt includes a pure Python module called <tt class="docutils literal"><span class="pre">pyqtconfig</span></tt> that extends
the SIP build system for modules, like our example, that build on top of PyQt.
It deals with the details of which version of Qt is being used (i.e. it
<p>Firstly, PyTQt includes a pure Python module called <tt class="docutils literal"><span class="pre">pyqtconfig</span></tt> that extends
the SIP build system for modules, like our example, that build on top of PyTQt.
It deals with the details of which version of TQt is being used (i.e. it
determines what the correct tags are) and where it is installed. This is
called a module&#8217;s configuration module.</p>
<p>Secondly, we generate a configuration module (called <tt class="docutils literal"><span class="pre">helloconfig</span></tt>) for our
@ -354,16 +355,16 @@ life easier for them.</p>
<p>Now we have two scripts. First the <tt class="docutils literal"><span class="pre">configure.py</span></tt> script:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">sipconfig</span>
<span class="kn">from</span> <span class="nn">PyQt4</span> <span class="kn">import</span> <span class="n">pyqtconfig</span>
<span class="kn">from</span> <span class="nn">PyTQt4</span> <span class="kn">import</span> <span class="n">pyqtconfig</span>
<span class="c"># The name of the SIP build file generated by SIP and used by the build</span>
<span class="c"># system.</span>
<span class="n">build_file</span> <span class="o">=</span> <span class="s">&quot;hello.sbf&quot;</span>
<span class="c"># Get the PyQt configuration information.</span>
<span class="c"># Get the PyTQt configuration information.</span>
<span class="n">config</span> <span class="o">=</span> <span class="n">pyqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="p">()</span>
<span class="c"># Get the extra SIP flags needed by the imported PyQt modules. Note that</span>
<span class="c"># Get the extra SIP flags needed by the imported PyTQt modules. Note that</span>
<span class="c"># this normally only includes those flags (-x and -t) that relate to SIP&#39;s</span>
<span class="c"># versioning system.</span>
<span class="n">pyqt_sip_flags</span> <span class="o">=</span> <span class="n">config</span><span class="o">.</span><span class="n">pyqt_sip_flags</span>
@ -380,10 +381,10 @@ life easier for them.</p>
<span class="n">installs</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="s">&quot;helloconfig.py&quot;</span><span class="p">,</span> <span class="n">config</span><span class="o">.</span><span class="n">default_mod_dir</span><span class="p">])</span>
<span class="c"># Create the Makefile. The QtGuiModuleMakefile class provided by the</span>
<span class="c"># Create the Makefile. The TQtGuiModuleMakefile class provided by the</span>
<span class="c"># pyqtconfig module takes care of all the extra preprocessor, compiler and</span>
<span class="c"># linker flags needed by the Qt library.</span>
<span class="n">makefile</span> <span class="o">=</span> <span class="n">pyqtconfig</span><span class="o">.</span><span class="n">QtGuiModuleMakefile</span><span class="p">(</span>
<span class="c"># linker flags needed by the TQt library.</span>
<span class="n">makefile</span> <span class="o">=</span> <span class="n">pyqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="p">(</span>
<span class="n">configuration</span><span class="o">=</span><span class="n">config</span><span class="p">,</span>
<span class="n">build_file</span><span class="o">=</span><span class="n">build_file</span><span class="p">,</span>
<span class="n">installs</span><span class="o">=</span><span class="n">installs</span>
@ -418,7 +419,7 @@ life easier for them.</p>
</pre></div>
</div>
<p>Next we have the <tt class="docutils literal"><span class="pre">helloconfig.py.in</span></tt> template script:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PyQt4</span> <span class="kn">import</span> <span class="n">pyqtconfig</span>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">PyTQt4</span> <span class="kn">import</span> <span class="n">pyqtconfig</span>
<span class="c"># These are installation specific values created when Hello was configured.</span>
<span class="c"># The following line will be replaced when this template is used to create</span>
@ -445,7 +446,7 @@ life easier for them.</p>
<span class="n">pyqtconfig</span><span class="o">.</span><span class="n">Configuration</span><span class="o">.</span><span class="n">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cfg</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">HelloModuleMakefile</span><span class="p">(</span><span class="n">pyqtconfig</span><span class="o">.</span><span class="n">QtGuiModuleMakefile</span><span class="p">):</span>
<span class="k">class</span> <span class="nc">HelloModuleMakefile</span><span class="p">(</span><span class="n">pyqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;The Makefile class for modules that %Import hello.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -455,7 +456,7 @@ life easier for them.</p>
<span class="bp">self</span><span class="o">.</span><span class="n">extra_libs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&quot;hello&quot;</span><span class="p">)</span>
<span class="c"># Let the super-class do what it needs to.</span>
<span class="n">pyqtconfig</span><span class="o">.</span><span class="n">QtGuiModuleMakefile</span><span class="o">.</span><span class="n">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="n">pyqtconfig</span><span class="o">.</span><span class="n">TQtGuiModuleMakefile</span><span class="o">.</span><span class="n">finalise</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
</pre></div>
</div>
<p>Again, we hope that the scripts are self documenting.</p>
@ -468,8 +469,8 @@ life easier for them.</p>
<table class="docutils footnote" frame="void" id="id12" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id9">[5]</a></td><td>Actually in <tt class="docutils literal"><span class="pre">versions.sip</span></tt>. PyQt uses the <a class="reference external" href="directives.html#directive-%Include"><tt class="xref docutils literal"><span class="pre">%Include</span></tt></a>
directive to split the SIP specification for Qt across a large number of
<tr><td class="label"><a class="fn-backref" href="#id9">[5]</a></td><td>Actually in <tt class="docutils literal"><span class="pre">versions.sip</span></tt>. PyTQt uses the <a class="reference external" href="directives.html#directive-%Include"><tt class="xref docutils literal"><span class="pre">%Include</span></tt></a>
directive to split the SIP specification for TQt across a large number of
separate <tt class="docutils literal"><span class="pre">.sip</span></tt> files.</td></tr>
</tbody>
</table>
@ -535,13 +536,13 @@ by importing modules.</p>
sub-classed from one of the SIP provided types. Your types must be registered
using <a title="sipRegisterPyType" class="reference external" href="c_api.html#sipRegisterPyType"><tt class="xref docutils literal"><span class="pre">sipRegisterPyType()</span></tt></a>. This is normally done in code specified
using the <a class="reference external" href="directives.html#directive-%InitialisationCode"><tt class="xref docutils literal"><span class="pre">%InitialisationCode</span></tt></a> directive.</p>
<p>As an example, PyQt4 uses <a class="reference external" href="directives.html#directive-%DefaultMetatype"><tt class="xref docutils literal"><span class="pre">%DefaultMetatype</span></tt></a> to specify a new
meta-type that handles the interaction with Qt&#8217;s own meta-type system. It also
<p>As an example, PyTQt4 uses <a class="reference external" href="directives.html#directive-%DefaultMetatype"><tt class="xref docutils literal"><span class="pre">%DefaultMetatype</span></tt></a> to specify a new
meta-type that handles the interaction with TQt&#8217;s own meta-type system. It also
uses <a class="reference external" href="directives.html#directive-%DefaultSupertype"><tt class="xref docutils literal"><span class="pre">%DefaultSupertype</span></tt></a> to specify that the smaller
<tt class="xref docutils literal"><span class="pre">sip.simplewrapper</span></tt> super-type is normally used. Finally it uses
<a class="reference external" href="annotations.html#canno-Supertype"><tt class="xref docutils literal"><span class="pre">Supertype</span></tt></a> as an annotation of the <tt class="docutils literal"><span class="pre">QObject</span></tt> class to override the
<a class="reference external" href="annotations.html#canno-Supertype"><tt class="xref docutils literal"><span class="pre">Supertype</span></tt></a> as an annotation of the <tt class="docutils literal"><span class="pre">TQObject</span></tt> class to override the
default and use <a title="sip.wrapper" class="reference external" href="python_api.html#sip.wrapper"><tt class="xref docutils literal"><span class="pre">sip.wrapper</span></tt></a> as the super-type so that the parent/child
relationships of <tt class="docutils literal"><span class="pre">QObject</span></tt> instances are properly maintained.</p>
relationships of <tt class="docutils literal"><span class="pre">TQObject</span></tt> instances are properly maintained.</p>
</div>
<div class="section" id="lazy-type-attributes">
<span id="ref-lazy-type-attributes"></span><h2>Lazy Type Attributes<a class="headerlink" href="#lazy-type-attributes" title="Permalink to this headline"></a></h2>
@ -566,8 +567,8 @@ ignored.</p>
<div class="section" id="support-for-wide-characters">
<h2>Support for Wide Characters<a class="headerlink" href="#support-for-wide-characters" title="Permalink to this headline"></a></h2>
<p>SIP v4.6 introduced support for wide characters (i.e. the <tt class="docutils literal"><span class="pre">wchar_t</span></tt> type).
Python&#8217;s C API includes support for converting between unicode objects and wide
character strings and arrays. When converting from a unicode object to wide
Python&#8217;s C API includes support for converting between tqunicode objects and wide
character strings and arrays. When converting from a tqunicode object to wide
characters SIP creates the string or array on the heap (using memory allocated
using <a title="sipMalloc" class="reference external" href="c_api.html#sipMalloc"><tt class="xref docutils literal"><span class="pre">sipMalloc()</span></tt></a>). This then raises the problem of how this memory
is subsequently freed.</p>

@ -762,7 +762,7 @@ static void xmlType(sipSpec *pt, argDef *ad, int sec, FILE *fp)
{
int a;
prcode(fp, "SLOT(");
prcode(fp, "TQT_SLOT(");
for (a = 0; a < ad->u.sa->nrArgs; ++a)
{
@ -956,11 +956,11 @@ static const char *pyType(sipSpec *pt, 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:
@ -968,12 +968,12 @@ static const char *pyType(sipSpec *pt, argDef *ad, int sec, classDef **scope)
if (sec)
type_name = "callable";
else
type_name = "QObject";
type_name = TQOBJECT_OBJECT_NAME_STRING;
break;
case qobject_type:
type_name = "QObject";
type_name = TQOBJECT_OBJECT_NAME_STRING;
break;
case ustring_type:
@ -1044,7 +1044,7 @@ static const char *pyType(sipSpec *pt, argDef *ad, int sec, classDef **scope)
case slotcon_type:
case anyslot_type:
type_name = "SLOT()";
type_name = "TQT_SLOT()";
break;
default:

File diff suppressed because it is too large Load Diff

@ -1836,7 +1836,7 @@ YY_RULE_SETUP
case 72:
YY_RULE_SETUP
#line 133 "/home/phil/hg/sip/sip-4.10.5/sipgen/lexer.l"
{return TK_QOBJECT;}
{return TK_TQOBJECT;}
YY_BREAK
case 73:
YY_RULE_SETUP
@ -1947,7 +1947,7 @@ YY_RULE_SETUP
yylval.qchar = yytext[1];
return TK_QCHAR;
return TK_TQCHAR;
}
YY_BREAK
case 84:

@ -84,10 +84,10 @@ struct {return TK_STRUCT;}
public {return TK_PUBLIC;}
protected {return TK_PROTECTED;}
private {return TK_PRIVATE;}
signals {return TK_SIGNALS;}
Q_SIGNALS {return TK_SIGNALS;}
Q_SIGNALS {return TK_SIGNALS;}
Q_SIGNAL {return TK_SIGNAL_METHOD;}
slots {return TK_SLOTS;}
Q_SLOTS {return TK_SLOTS;}
Q_SLOTS {return TK_SLOTS;}
Q_SLOT {return TK_SLOT_METHOD;}
char {return TK_CHAR;}

@ -480,7 +480,7 @@ static void help(void)
"where:\n"
" -h display this help message\n"
" -V display the %s version number\n"
" -a file the name of the QScintilla API file [default not generated]\n"
" -a file the name of the TQScintilla API file [default not generated]\n"
" -b file the name of the build file [default none generated]\n"
" -c dir the name of the code directory [default not generated]\n"
" -d file the name of the documentation file [default not generated]\n"

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

@ -121,9 +121,9 @@
TK_LOGICAL_OR = 337,
TK_CONST = 338,
TK_STATIC = 339,
TK_SIPSIGNAL = 340,
TK_SIPSLOT = 341,
TK_SIPANYSLOT = 342,
TK_SIPTQT_SIGNAL = 340,
TK_SIPTQT_SLOT = 341,
TK_SIPANYTQT_SLOT = 342,
TK_SIPRXCON = 343,
TK_SIPRXDIS = 344,
TK_SIPSLOTCON = 345,
@ -136,13 +136,13 @@
TK_PLATFORMS = 352,
TK_FEATURE = 353,
TK_LICENSE = 354,
TK_QCHAR = 355,
TK_TQCHAR = 355,
TK_TRUE = 356,
TK_FALSE = 357,
TK_NULL = 358,
TK_OPERATOR = 359,
TK_THROW = 360,
TK_QOBJECT = 361,
TK_TQOBJECT = 361,
TK_EXCEPTION = 362,
TK_RAISECODE = 363,
TK_EXPLICIT = 364,
@ -235,9 +235,9 @@
#define TK_LOGICAL_OR 337
#define TK_CONST 338
#define TK_STATIC 339
#define TK_SIPSIGNAL 340
#define TK_SIPSLOT 341
#define TK_SIPANYSLOT 342
#define TK_SIPTQT_SIGNAL 340
#define TK_SIPTQT_SLOT 341
#define TK_SIPANYTQT_SLOT 342
#define TK_SIPRXCON 343
#define TK_SIPRXDIS 344
#define TK_SIPSLOTCON 345
@ -250,13 +250,13 @@
#define TK_PLATFORMS 352
#define TK_FEATURE 353
#define TK_LICENSE 354
#define TK_QCHAR 355
#define TK_TQCHAR 355
#define TK_TRUE 356
#define TK_FALSE 357
#define TK_NULL 358
#define TK_OPERATOR 359
#define TK_THROW 360
#define TK_QOBJECT 361
#define TK_TQOBJECT 361
#define TK_EXCEPTION 362
#define TK_RAISECODE 363
#define TK_EXPLICIT 364

@ -1772,7 +1772,7 @@ classline: ifstart
}
| TK_SIGNALS ':' {
if (currentSpec -> genc)
yyerror("signals section not allowed in a C module");
yyerror("Q_SIGNALS section not allowed in a C module");
if (notSkipping())
sectionFlags = SECT_IS_SIGNAL;
@ -2288,7 +2288,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
$$.name = cacheName(currentSpec, $2);
$$.defval = $4;
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_SIPSLOT optname optflags optassign {
$$.atype = slot_type;
@ -2297,7 +2297,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
$$.name = cacheName(currentSpec, $2);
$$.defval = $4;
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_SIPANYSLOT optname optflags optassign {
$$.atype = anyslot_type;
@ -2306,7 +2306,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
$$.name = cacheName(currentSpec, $2);
$$.defval = $4;
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_SIPRXCON optname optflags {
$$.atype = rxcon_type;
@ -2317,7 +2317,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
if (findOptFlag(&$3, "SingleShot", bool_flag) != NULL)
$$.argflags |= ARG_SINGLE_SHOT;
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_SIPRXDIS optname optflags {
$$.atype = rxdis_type;
@ -2325,7 +2325,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
$$.nrderefs = 0;
$$.name = cacheName(currentSpec, $2);
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_SIPSLOTCON '(' arglist ')' optname optflags {
$$.atype = slotcon_type;
@ -2339,7 +2339,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
$$.u.sa = sipMalloc(sizeof (signatureDef));
*$$.u.sa = $3;
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_SIPSLOTDIS '(' arglist ')' optname optflags {
$$.atype = slotdis_type;
@ -2353,7 +2353,7 @@ argvalue: TK_SIPSIGNAL optname optflags optassign {
$$.u.sa = sipMalloc(sizeof (signatureDef));
*$$.u.sa = $3;
currentSpec -> sigslots = TRUE;
currentSpec -> sigQ_SLOTS = TRUE;
}
| TK_QOBJECT optname optflags {
$$.atype = qobject_type;
@ -2750,7 +2750,7 @@ void parse(sipSpec *spec, FILE *fp, char *filename, stringList *tsl,
spec->typedefs = NULL;
spec->exphdrcode = NULL;
spec->docs = NULL;
spec->sigslots = FALSE;
spec->sigQ_SLOTS = FALSE;
spec->genc = -1;
spec->plugins = NULL;
@ -3666,7 +3666,7 @@ static enumDef *newEnum(sipSpec *pt, moduleDef *mod, mappedTypeDef *mt_scope,
ed->next_alt = next_alt;
ed->module = mod;
ed->members = NULL;
ed->slots = NULL;
ed->Q_SLOTS = NULL;
ed->overs = NULL;
ed->next = pt -> enums;
@ -4249,9 +4249,9 @@ static void instantiateTemplateEnums(sipSpec *pt, classTmplDef *tcd,
ed->members = emd;
}
ed->slots = instantiateTemplateMethods(ted->slots, mod);
ed->Q_SLOTS = instantiateTemplateMethods(ted->Q_SLOTS, mod);
ed->overs = instantiateTemplateOverloads(pt, ted->overs,
ted->slots, ed->slots, tcd, td, cd, used, type_names,
ted->Q_SLOTS, ed->Q_SLOTS, tcd, td, cd, used, type_names,
type_values);
ed->next = pt->enums;
@ -4969,16 +4969,16 @@ static void newFunction(sipSpec *pt, moduleDef *mod, classDef *c_scope,
if (isSignal(od))
setHasShadow(c_scope);
pt->sigslots = TRUE;
pt->sigQ_SLOTS = TRUE;
}
if (isSignal(od) && (methodcode != NULL || vcode != NULL))
yyerror("Cannot provide code for signals");
yyerror("Cannot provide code for Q_SIGNALS");
if (isstatic)
{
if (isSignal(od))
yyerror("Static functions cannot be signals");
yyerror("Static functions cannot be Q_SIGNALS");
if (isvirt)
yyerror("Static functions cannot be virtual");
@ -5006,7 +5006,7 @@ static void newFunction(sipSpec *pt, moduleDef *mod, classDef *c_scope,
if (isvirt)
{
if (isSignal(od) && pluginPyQt3(pt))
yyerror("Virtual signals aren't supported");
yyerror("Virtual Q_SIGNALS aren't supported");
setIsVirtual(od);
setHasShadow(c_scope);
@ -5232,7 +5232,7 @@ static memberDef *findFunction(sipSpec *pt, moduleDef *mod, classDef *c_scope,
int nrargs; /* Nr. of arguments. */
} slot_table[] = {
{"__str__", str_slot, TRUE, 0},
{"__unicode__", unicode_slot, TRUE, 0},
{"__tqunicode__", tqunicode_slot, TRUE, 0},
{"__int__", int_slot, FALSE, 0},
{"__long__", long_slot, FALSE, 0},
{"__float__", float_slot, FALSE, 0},

@ -44,7 +44,7 @@
/* For convenience. */
#define classBaseName(cd) scopedNameTail((cd)->iff->fqcname)
#define classFQCName(cd) ((cd)->iff->fqcname)
#define classFTQCName(cd) ((cd)->iff->fqcname)
/* Handle module flags. */
@ -90,10 +90,10 @@
#define CLASS_IS_EXTERNAL 0x00080000 /* It is external. */
#define CLASS_IS_DELAYED_DTOR 0x00100000 /* The dtor is delayed. */
#define CLASS_NO_DEFAULT_CTORS 0x00200000 /* Don't create default ctors. */
#define CLASS_QOBJECT_SUB 0x00400000 /* It is derived from QObject. */
#define CLASS_TQOBJECT_SUB 0x00400000 /* It is derived from TQObject. */
#define CLASS_DTOR_HOLD_GIL 0x00800000 /* The dtor holds the GIL. */
#define CLASS_ASSIGN_HELPER 0x01000000 /* Generate an assignment helper. */
#define CLASS_NO_QMETAOBJECT 0x02000000 /* It has no QMetaObject. */
#define CLASS_NO_TQMETAOBJECT 0x02000000 /* It has no TQMetaObject. */
#define CLASS_IS_TEMPLATE 0x04000000 /* It is a template class. */
#define CLASS_IS_DEPRECATED 0x08000000 /* It is deprecated. */
#define CLASS_CANNOT_COPY 0x10000000 /* It cannot be copied. */
@ -130,14 +130,14 @@
#define setIsDelayedDtor(cd) ((cd)->classflags |= CLASS_IS_DELAYED_DTOR)
#define noDefaultCtors(cd) ((cd)->classflags & CLASS_NO_DEFAULT_CTORS)
#define setNoDefaultCtors(cd) ((cd)->classflags |= CLASS_NO_DEFAULT_CTORS)
#define isQObjectSubClass(cd) ((cd)->classflags & CLASS_QOBJECT_SUB)
#define setIsQObjectSubClass(cd) ((cd)->classflags |= CLASS_QOBJECT_SUB)
#define isTQObjectSubClass(cd) ((cd)->classflags & CLASS_TQOBJECT_SUB)
#define setIsTQObjectSubClass(cd) ((cd)->classflags |= CLASS_TQOBJECT_SUB)
#define isHoldGILDtor(cd) ((cd)->classflags & CLASS_DTOR_HOLD_GIL)
#define setIsHoldGILDtor(cd) ((cd)->classflags |= CLASS_DTOR_HOLD_GIL)
#define assignmentHelper(cd) ((cd)->classflags & CLASS_ASSIGN_HELPER)
#define setAssignmentHelper(cd) ((cd)->classflags |= CLASS_ASSIGN_HELPER)
#define noPyQt4QMetaObject(cd) ((cd)->classflags & CLASS_NO_QMETAOBJECT)
#define setPyQt4NoQMetaObject(cd) ((cd)->classflags |= CLASS_NO_QMETAOBJECT)
#define noPyTQt4TQMetaObject(cd) ((cd)->classflags & CLASS_NO_TQMETAOBJECT)
#define setPyTQt4NoTQMetaObject(cd) ((cd)->classflags |= CLASS_NO_TQMETAOBJECT)
#define isTemplateClass(cd) ((cd)->classflags & CLASS_IS_TEMPLATE)
#define setIsTemplateClass(cd) ((cd)->classflags |= CLASS_IS_TEMPLATE)
#define resetIsTemplateClass(cd) ((cd)->classflags &= ~CLASS_IS_TEMPLATE)
@ -425,7 +425,7 @@
typedef enum {
str_slot,
unicode_slot,
tqunicode_slot,
int_slot,
long_slot,
float_slot,
@ -722,7 +722,7 @@ typedef struct _moduleDef {
apiVersionRangeDef *api_versions; /* The defined APIs. */
apiVersionRangeDef *api_ranges; /* The list of API version ranges. */
int modflags; /* The module flags. */
int qobjclass; /* QObject class, -1 if none. */
int qobjclass; /* TQObject class, -1 if none. */
struct _memberDef *othfuncs; /* List of other functions. */
struct _overDef *overs; /* Global overloads. */
argType encoding; /* The default string encoding. */
@ -988,7 +988,7 @@ typedef struct _mroDef {
typedef struct _classDef {
int classflags; /* The class flags. */
int pyqt4_flags; /* The PyQt4 specific flags. */
int pyqt4_flags; /* The PyTQt4 specific flags. */
nameDef *pyname; /* The Python name. */
ifaceFileDef *iff; /* The interface file. */
struct _classDef *ecd; /* The enclosing scope. */
@ -1138,8 +1138,8 @@ codeBlock *templateCode(sipSpec *pt, ifaceFileList **used, codeBlock *ocb, scope
ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod,
scopedNameDef *fqname, ifaceFileType iftype,
apiVersionRangeDef *api_range, argDef *ad);
int pluginPyQt3(sipSpec *pt);
int pluginPyQt4(sipSpec *pt);
int pluginPyTQt3(sipSpec *pt);
int pluginPyTQt4(sipSpec *pt);
void yywarning(char *);
nameDef *cacheName(sipSpec *pt, const char *name);
scopedNameDef *encodedTemplateName(templateDef *td);

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

@ -1,6 +1,6 @@
/*
* The SIP library code that implements the interface to the optional module
* supplied Qt support.
* supplied TQt support.
*
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
*
@ -26,9 +26,9 @@
#include "sipint.h"
/* This is how Qt "types" signals and slots. */
#define isQtSlot(s) (*(s) == '1')
#define isQtSignal(s) (*(s) == '2')
/* This is how TQt "types" signals and slots. */
#define isTQtSlot(s) (*(s) == '1')
#define isTQtSignal(s) (*(s) == '2')
static PyObject *getWeakRef(PyObject *obj);
@ -44,8 +44,8 @@ static void *newSignal(void *txrx, const char **sig);
*/
static void *findSignal(void *txrx, const char **sig)
{
if (sipQtSupport->qt_find_universal_signal != NULL)
txrx = sipQtSupport->qt_find_universal_signal(txrx, sig);
if (sipTQtSupport->qt_find_universal_signal != NULL)
txrx = sipTQtSupport->qt_find_universal_signal(txrx, sig);
return txrx;
}
@ -58,8 +58,8 @@ static void *newSignal(void *txrx, const char **sig)
{
void *new_txrx = findSignal(txrx, sig);
if (new_txrx == NULL && sipQtSupport->qt_create_universal_signal != NULL)
new_txrx = sipQtSupport->qt_create_universal_signal(txrx, sig);
if (new_txrx == NULL && sipTQtSupport->qt_create_universal_signal != NULL)
new_txrx = sipTQtSupport->qt_create_universal_signal(txrx, sig);
return new_txrx;
}
@ -72,7 +72,7 @@ static void *newSignal(void *txrx, const char **sig)
static void *createUniversalSlot(sipWrapper *txSelf, const char *sig,
PyObject *rxObj, const char *slot, const char **member, int flags)
{
void *us = sipQtSupport->qt_create_universal_slot(txSelf, sig, rxObj, slot,
void *us = sipTQtSupport->qt_create_universal_slot(txSelf, sig, rxObj, slot,
member, flags);
if (us && txSelf)
@ -83,7 +83,7 @@ static void *createUniversalSlot(sipWrapper *txSelf, const char *sig,
/*
* Invoke a single slot (Qt or Python) and return the result.
* Invoke a single slot (TQt or Python) and return the result.
*/
PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
{
@ -92,12 +92,12 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
/* Keep some compilers quiet. */
oxtype = oxvalue = oxtb = NULL;
/* Fan out Qt signals. (Only PyQt3 will do this.) */
/* Fan out TQt signals. (Only PyTQt3 will do this.) */
if (slot->name != NULL && slot->name[0] != '\0')
{
assert(sipQtSupport->qt_emit_signal);
assert(sipTQtSupport->qt_emit_signal);
if (sipQtSupport->qt_emit_signal(slot->pyobj, slot->name, sigargs) < 0)
if (sipTQtSupport->qt_emit_signal(slot->pyobj, slot->name, sigargs) < 0)
return NULL;
Py_INCREF(Py_None);
@ -125,7 +125,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
{
/*
* If the real object has gone then we pretend everything is Ok. This
* mimics the Qt behaviour of not caring if a receiving object has been
* mimics the TQt behaviour of not caring if a receiving object has been
* deleted.
*/
Py_DECREF(sref);
@ -191,7 +191,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
* We make repeated attempts to call a slot. If we work out that it failed
* because of an immediate type error we try again with one less argument.
* We keep going until we run out of arguments to drop. This emulates the
* Qt ability of the slot to accept fewer arguments than a signal provides.
* TQt ability of the slot to accept fewer arguments than a signal provides.
*/
sa = sigargs;
Py_INCREF(sa);
@ -307,13 +307,13 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
*/
int sip_api_same_slot(const sipSlot *sp, PyObject *rxObj, const char *slot)
{
/* See if they are signals or Qt slots, ie. they have a name. */
/* See if they are signals or TQt slots, ie. they have a name. */
if (slot != NULL)
{
if (sp->name == NULL || sp->name[0] == '\0')
return 0;
return (sipQtSupport->qt_same_name(sp->name, slot) && sp->pyobj == rxObj);
return (sipTQtSupport->qt_same_name(sp->name, slot) && sp->pyobj == rxObj);
}
/* See if they are pure Python methods. */
@ -352,32 +352,32 @@ void *sipGetRx(sipSimpleWrapper *txSelf, const char *sigargs, PyObject *rxObj,
const char *slot, const char **memberp)
{
if (slot != NULL)
if (isQtSlot(slot) || isQtSignal(slot))
if (isTQtSlot(slot) || isTQtSignal(slot))
{
void *rx;
*memberp = slot;
if ((rx = sip_api_get_cpp_ptr((sipSimpleWrapper *)rxObj, sipQObjectType)) == NULL)
if ((rx = sip_api_get_cpp_ptr((sipSimpleWrapper *)rxObj, sipTQObjectType)) == NULL)
return NULL;
if (isQtSignal(slot))
if (isTQtSignal(slot))
rx = findSignal(rx, memberp);
return rx;
}
/*
* The slot was either a Python callable or PyQt3 Python signal so there
* The slot was either a Python callable or PyTQt3 Python signal so there
* should be a universal slot.
*/
return sipQtSupport->qt_find_slot(sipGetAddress(txSelf), sigargs, rxObj, slot, memberp);
return sipTQtSupport->qt_find_slot(sipGetAddress(txSelf), sigargs, rxObj, slot, memberp);
}
/*
* Convert a Python receiver (either a Python signal or slot or a Qt signal or
* slot) to a Qt receiver. It is only ever called when the signal is a Qt
* Convert a Python receiver (either a Python signal or slot or a TQt signal or
* slot) to a TQt receiver. It is only ever called when the signal is a TQt
* signal. Return NULL is there was an error.
*/
void *sip_api_convert_rx(sipWrapper *txSelf, const char *sigargs,
@ -386,16 +386,16 @@ void *sip_api_convert_rx(sipWrapper *txSelf, const char *sigargs,
if (slot == NULL)
return createUniversalSlot(txSelf, sigargs, rxObj, NULL, memberp, flags);
if (isQtSlot(slot) || isQtSignal(slot))
if (isTQtSlot(slot) || isTQtSignal(slot))
{
void *rx;
*memberp = slot;
if ((rx = sip_api_get_cpp_ptr((sipSimpleWrapper *)rxObj, sipQObjectType)) == NULL)
if ((rx = sip_api_get_cpp_ptr((sipSimpleWrapper *)rxObj, sipTQObjectType)) == NULL)
return NULL;
if (isQtSignal(slot))
if (isTQtSignal(slot))
rx = newSignal(rx, memberp);
return rx;
@ -407,20 +407,20 @@ void *sip_api_convert_rx(sipWrapper *txSelf, const char *sigargs,
/*
* Connect a Qt signal or a Python signal to a Qt slot, a Qt signal, a Python
* Connect a TQt signal or a Python signal to a TQt slot, a TQt signal, a Python
* slot or a Python signal. This is all possible combinations.
*/
PyObject *sip_api_connect_rx(PyObject *txObj, const char *sig, PyObject *rxObj,
const char *slot, int type)
{
/* Handle Qt signals. */
if (isQtSignal(sig))
/* Handle TQt signals. */
if (isTQtSignal(sig))
{
void *tx, *rx;
const char *member, *real_sig;
int res;
if ((tx = sip_api_get_cpp_ptr((sipSimpleWrapper *)txObj, sipQObjectType)) == NULL)
if ((tx = sip_api_get_cpp_ptr((sipSimpleWrapper *)txObj, sipTQObjectType)) == NULL)
return NULL;
real_sig = sig;
@ -431,15 +431,15 @@ PyObject *sip_api_connect_rx(PyObject *txObj, const char *sig, PyObject *rxObj,
if ((rx = sip_api_convert_rx((sipWrapper *)txObj, sig, rxObj, slot, &member, 0)) == NULL)
return NULL;
res = sipQtSupport->qt_connect(tx, real_sig, rx, member, type);
res = sipTQtSupport->qt_connect(tx, real_sig, rx, member, type);
return PyBool_FromLong(res);
}
/* Handle Python signals. Only PyQt3 will get this far. */
assert(sipQtSupport->qt_connect_py_signal);
/* Handle Python signals. Only PyTQt3 will get this far. */
assert(sipTQtSupport->qt_connect_py_signal);
if (sipQtSupport->qt_connect_py_signal(txObj, sig, rxObj, slot) < 0)
if (sipTQtSupport->qt_connect_py_signal(txObj, sig, rxObj, slot) < 0)
return NULL;
Py_INCREF(Py_True);
@ -448,20 +448,20 @@ PyObject *sip_api_connect_rx(PyObject *txObj, const char *sig, PyObject *rxObj,
/*
* Disconnect a signal to a signal or a Qt slot.
* Disconnect a signal to a signal or a TQt slot.
*/
PyObject *sip_api_disconnect_rx(PyObject *txObj,const char *sig,
PyObject *rxObj,const char *slot)
{
/* Handle Qt signals. */
if (isQtSignal(sig))
/* Handle TQt signals. */
if (isTQtSignal(sig))
{
sipSimpleWrapper *txSelf = (sipSimpleWrapper *)txObj;
void *tx, *rx;
const char *member;
int res;
if ((tx = sip_api_get_cpp_ptr(txSelf, sipQObjectType)) == NULL)
if ((tx = sip_api_get_cpp_ptr(txSelf, sipTQObjectType)) == NULL)
return NULL;
if ((rx = sipGetRx(txSelf, sig, rxObj, slot, &member)) == NULL)
@ -473,22 +473,22 @@ PyObject *sip_api_disconnect_rx(PyObject *txObj,const char *sig,
/* Handle Python signals. */
tx = findSignal(tx, &sig);
res = sipQtSupport->qt_disconnect(tx, sig, rx, member);
res = sipTQtSupport->qt_disconnect(tx, sig, rx, member);
/*
* Delete it if it is a universal slot as this will be it's only
* connection. If the slot is actually a universal signal then it
* should leave it in place.
*/
sipQtSupport->qt_destroy_universal_slot(rx);
sipTQtSupport->qt_destroy_universal_slot(rx);
return PyBool_FromLong(res);
}
/* Handle Python signals. Only PyQt3 will get this far. */
assert(sipQtSupport->qt_disconnect_py_signal);
/* Handle Python signals. Only PyTQt3 will get this far. */
assert(sipTQtSupport->qt_disconnect_py_signal);
sipQtSupport->qt_disconnect_py_signal(txObj, sig, rxObj, slot);
sipTQtSupport->qt_disconnect_py_signal(txObj, sig, rxObj, slot);
Py_INCREF(Py_True);
return Py_True;
@ -530,7 +530,7 @@ static char *sipStrdup(const char *s)
/*
* Initialise a slot, returning 0 if there was no error. If the signal was a
* Qt signal, then the slot may be a Python signal or a Python slot. If the
* TQt signal, then the slot may be a Python signal or a Python slot. If the
* signal was a Python signal, then the slot may be anything.
*/
int sip_api_save_slot(sipSlot *sp, PyObject *rxObj, const char *slot)
@ -576,7 +576,7 @@ int sip_api_save_slot(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;
@ -613,11 +613,11 @@ int sip_api_save_slot(sipSlot *sp, PyObject *rxObj, const char *slot)
}
else if ((sp -> name = sipStrdup(slot)) == NULL)
return -1;
else if (isQtSlot(slot))
else if (isTQtSlot(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".
* The user has decided to connect a Python signal to a TQt slot and
* specified the slot as "obj, TQT_SLOT('meth()')" rather than "obj.meth".
*/
char *tail;
@ -638,7 +638,7 @@ int sip_api_save_slot(sipSlot *sp, PyObject *rxObj, const char *slot)
sp -> pyobj = rxObj;
}
else
/* It's a Qt signal. */
/* It's a TQt signal. */
sp -> pyobj = rxObj;
return 0;

@ -22,8 +22,8 @@
/*
* This gets round a problem with Qt's moc and Python v2.3. Strictly speaking
* it's a Qt problem but later versions of Python include a fix for it so we
* This gets round a problem with TQt's tqmoc and Python v2.3. Strictly speaking
* it's a TQt problem but later versions of Python include a fix for it so we
* might as well too.
*/
#undef slots
@ -99,7 +99,7 @@ extern "C" {
* 4.0 Much refactoring.
*
* 3.8 Added sip_api_register_qt_metatype() and sip_api_deprecated().
* Added qt_register_meta_type() to the Qt support API.
* Added qt_register_meta_type() to the TQt support API.
* The C/C++ names of enums and types are now always defined in the
* relevant structures and don't default to the Python name.
* Added the 'XE' format characters to sip_api_parse_args().
@ -125,9 +125,9 @@ extern "C" {
* 3.5 Added the td_pickle field to the sipTypeDef structure.
* Added sip_api_transfer_break().
*
* 3.4 Added qt_find_connection() to the Qt support API.
* Added sip_api_string_as_char(), sip_api_unicode_as_wchar(),
* sip_api_unicode_as_wstring(), sip_api_find_class(),
* 3.4 Added qt_find_connection() to the TQt support API.
* Added sip_api_string_as_char(), sip_api_tqunicode_as_wchar(),
* sip_api_tqunicode_as_wstring(), sip_api_find_class(),
* sip_api_find_named_enum() and sip_api_parse_signature().
* Added the 'A', 'w' and 'x' format characters to sip_api_parse_args(),
* sip_api_parse_result(), sip_api_build_result() and
@ -139,7 +139,7 @@ extern "C" {
*
* 3.1 Added sip_api_add_mapped_type_instance().
*
* 3.0 Moved the Qt support out of the sip module and into PyQt. This is
* 3.0 Moved the TQt support out of the sip module and into PyTQt. This is
* such a dramatic change that there is no point in attempting to maintain
* backwards compatibility.
*
@ -927,8 +927,8 @@ typedef struct _sipExportedModuleDef {
/* The imported modules. */
sipImportedModuleDef *em_imports;
/* The optional Qt support API. */
struct _sipQtAPI *em_qt_api;
/* The optional TQt support API. */
struct _sipTQtAPI *em_qt_api;
/* The number of types. */
int em_nrtypes;
@ -1199,13 +1199,13 @@ typedef struct _sipPyMethod {
/*
* A slot (in the Qt, rather than Python, sense).
* A slot (in the TQt, rather than Python, sense).
*/
typedef struct _sipSlot {
/* Name if a Qt or Python signal. */
/* Name if a TQt or Python signal. */
char *name;
/* Signal or Qt slot object. */
/* Signal or TQt slot object. */
PyObject *pyobj;
/* Python slot method, pyobj is NULL. */
@ -1302,7 +1302,7 @@ typedef struct _sipAPIDef {
const sipStringTypeClassMap *map, int maplen);
/*
* The following may be used by Qt support code but no other handwritten
* The following may be used by TQt support code but no other handwritten
* code.
*/
void (*api_free_sipslot)(sipSlot *slot);
@ -1355,11 +1355,11 @@ typedef struct _sipAPIDef {
char (*api_string_as_utf8_char)(PyObject *obj);
const char *(*api_string_as_utf8_string)(PyObject **obj);
#if defined(HAVE_WCHAR_H)
wchar_t (*api_unicode_as_wchar)(PyObject *obj);
wchar_t *(*api_unicode_as_wstring)(PyObject *obj);
wchar_t (*api_tqunicode_as_wchar)(PyObject *obj);
wchar_t *(*api_tqunicode_as_wstring)(PyObject *obj);
#else
int (*api_unicode_as_wchar)(PyObject *obj);
int *(*api_unicode_as_wstring)(PyObject *obj);
int (*api_tqunicode_as_wchar)(PyObject *obj);
int *(*api_tqunicode_as_wstring)(PyObject *obj);
#endif
int (*api_deprecated)(const char *classname, const char *method);
void (*api_keep_reference)(PyObject *self, int key, PyObject *obj);
@ -1371,9 +1371,9 @@ typedef struct _sipAPIDef {
/*
* The API implementing the optional Qt support.
* The API implementing the optional TQt support.
*/
typedef struct _sipQtAPI {
typedef struct _sipTQtAPI {
sipTypeDef **qt_qobject;
void *(*qt_create_universal_signal)(void *, const char **);
void *(*qt_find_universal_signal)(void *, const char **);
@ -1391,7 +1391,7 @@ typedef struct _sipQtAPI {
const char *);
void (*qt_disconnect_py_signal)(PyObject *, const char *, PyObject *,
const char *);
} sipQtAPI;
} sipTQtAPI;
/*
@ -1411,7 +1411,7 @@ typedef struct _sipQtAPI {
/*
* These flags are specific to the Qt support API.
* These flags are specific to the TQt support API.
*/
#define SIP_SINGLE_SHOT 0x01 /* The connection is single shot. */
@ -1495,27 +1495,27 @@ typedef struct _sipQtAPI {
/*
* The following are PyQt3-specific extensions. In SIP v5 they will be pushed
* out to a plugin supplied by PyQt3.
* The following are PyTQt3-specific extensions. In SIP v5 they will be pushed
* out to a plugin supplied by PyTQt3.
*/
typedef int (*pyqt3EmitFunc)(sipSimpleWrapper *, PyObject *);
/*
* Maps the name of a Qt signal to a wrapper function to emit it.
* Maps the name of a TQt signal to a wrapper function to emit it.
*/
typedef struct _pyqt3QtSignal {
typedef struct _pyqt3TQtSignal {
/* The signal name. */
const char *st_name;
/* The emitter function. */
pyqt3EmitFunc st_emitfunc;
} pyqt3QtSignal;
} pyqt3TQtSignal;
/*
* This is the PyQt3-specific extension to the generated class type structure.
* This is the PyTQt3-specific extension to the generated class type structure.
*/
typedef struct _pyqt3ClassTypeDef {
/*
@ -1524,20 +1524,20 @@ typedef struct _pyqt3ClassTypeDef {
*/
sipClassTypeDef super;
/* The emit table for Qt signals. */
pyqt3QtSignal *qt3_emit;
/* The emit table for TQt signals. */
pyqt3TQtSignal *qt3_emit;
} pyqt3ClassTypeDef;
/*
* The following are PyQt4-specific extensions. In SIP v5 they will be pushed
* out to a plugin supplied by PyQt4.
* The following are PyTQt4-specific extensions. In SIP v5 they will be pushed
* out to a plugin supplied by PyTQt4.
*/
/*
* The description of a Qt signal for PyQt4.
* The description of a TQt signal for PyTQt4.
*/
typedef struct _pyqt4QtSignal {
typedef struct _pyqt4TQtSignal {
/* The C++ name and signature of the signal. */
const char *signature;
@ -1549,11 +1549,11 @@ typedef struct _pyqt4QtSignal {
* code that implements those methods.
*/
PyMethodDef *non_signals;
} pyqt4QtSignal;
} pyqt4TQtSignal;
/*
* This is the PyQt4-specific extension to the generated class type structure.
* This is the PyTQt4-specific extension to the generated class type structure.
*/
typedef struct _pyqt4ClassTypeDef {
/*
@ -1562,12 +1562,12 @@ typedef struct _pyqt4ClassTypeDef {
*/
sipClassTypeDef super;
/* A pointer to the QObject sub-class's staticMetaObject class variable. */
/* A pointer to the TQObject sub-class's staticMetaObject class variable. */
const void *qt4_static_metaobject;
/*
* A set of flags. At the moment only bit 0 is used to say if the type is
* derived from QFlags.
* derived from TQFlags.
*/
unsigned qt4_flags;
@ -1575,7 +1575,7 @@ typedef struct _pyqt4ClassTypeDef {
* The table of signals emitted by the type. These are grouped by signal
* name.
*/
const pyqt4QtSignal *qt4_signals;
const pyqt4TQtSignal *qt4_signals;
} pyqt4ClassTypeDef;

@ -89,9 +89,9 @@ PyObject *sip_api_convert_from_const_void_ptr_and_size(const void *val,
SIP_SSIZE_T size);
extern sipQtAPI *sipQtSupport; /* The Qt support API. */
extern sipTQtAPI *sipTQtSupport; /* The TQt support API. */
extern sipWrapperType sipSimpleWrapper_Type; /* The simple wrapper type. */
extern sipTypeDef *sipQObjectType; /* The QObject type. */
extern sipTypeDef *sipTQObjectType; /* The TQObject type. */
void *sipGetRx(sipSimpleWrapper *txSelf, const char *sigargs, PyObject *rxObj,
const char *slot, const char **memberp);

@ -232,11 +232,11 @@ static const char *sip_api_string_as_latin1_string(PyObject **obj);
static char sip_api_string_as_utf8_char(PyObject *obj);
static const char *sip_api_string_as_utf8_string(PyObject **obj);
#if defined(HAVE_WCHAR_H)
static wchar_t sip_api_unicode_as_wchar(PyObject *obj);
static wchar_t *sip_api_unicode_as_wstring(PyObject *obj);
static wchar_t sip_api_tqunicode_as_wchar(PyObject *obj);
static wchar_t *sip_api_tqunicode_as_wstring(PyObject *obj);
#else
static int sip_api_unicode_as_wchar(PyObject *obj);
static int *sip_api_unicode_as_wstring(PyObject *obj);
static int sip_api_tqunicode_as_wchar(PyObject *obj);
static int *sip_api_tqunicode_as_wstring(PyObject *obj);
#endif
static void sip_api_transfer_break(PyObject *self);
static int sip_api_deprecated(const char *classname, const char *method);
@ -316,7 +316,7 @@ static const sipAPIDef sip_api = {
sip_api_map_int_to_class,
sip_api_map_string_to_class,
/*
* The following may be used by Qt support code but by no other handwritten
* The following may be used by TQt support code but by no other handwritten
* code.
*/
sip_api_free_sipslot,
@ -357,8 +357,8 @@ static const sipAPIDef sip_api = {
sip_api_string_as_latin1_string,
sip_api_string_as_utf8_char,
sip_api_string_as_utf8_string,
sip_api_unicode_as_wchar,
sip_api_unicode_as_wstring,
sip_api_tqunicode_as_wchar,
sip_api_tqunicode_as_wstring,
sip_api_deprecated,
sip_api_keep_reference,
sip_api_parse_kwd_args,
@ -494,8 +494,8 @@ static PyTypeObject sipEnumType_Type = {
};
sipQtAPI *sipQtSupport = NULL;
sipTypeDef *sipQObjectType;
sipTQtAPI *sipTQtSupport = NULL;
sipTypeDef *sipTQObjectType;
/*
@ -541,7 +541,7 @@ static int parsePass2(sipSimpleWrapper *self, int selfarg, PyObject *sipArgs,
va_list va);
static PyObject *signature_FromDocstring(const char *doc, SIP_SSIZE_T line);
static PyObject *detail_FromFailure(PyObject *failure_obj);
static int isQObject(PyObject *obj);
static int isTQObject(PyObject *obj);
static int canConvertFromSequence(PyObject *seq, const sipTypeDef *td);
static int convertFromSequence(PyObject *seq, const sipTypeDef *td,
void **array, SIP_SSIZE_T *nr_elem);
@ -834,7 +834,7 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
/* Initialise the object map. */
sipOMInit(&cppPyMap);
sipQtSupport = NULL;
sipTQtSupport = NULL;
/*
* Get the current interpreter. This will be shared between all
@ -1247,11 +1247,11 @@ 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",
"the %s and %s modules both wrap the TQObject class",
full_name, sipNameOfModule(em));
return -1;
@ -1383,11 +1383,11 @@ static int sip_api_init_module(sipExportedModuleDef *client,
}
}
/* Set any Qt support API. */
/* Set any TQt support API. */
if (client->em_qt_api != NULL)
{
sipQtSupport = client->em_qt_api;
sipQObjectType = *sipQtSupport->qt_qobject;
sipTQtSupport = client->em_qt_api;
sipTQObjectType = *sipTQtSupport->qt_qobject;
}
/* Append any initialiser extenders to the relevant classes. */
@ -3727,13 +3727,13 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
case 'R':
{
/* Sub-class of QObject. */
/* Sub-class of TQObject. */
PyObject **p = va_arg(va, PyObject **);
if (arg != NULL)
{
if (isQObject(arg))
if (isTQObject(arg))
{
*p = arg;
}
@ -3796,13 +3796,13 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
case 'q':
{
/* Qt receiver to connect. */
/* TQt receiver to connect. */
va_arg(va, char *);
va_arg(va, void **);
va_arg(va, const char **);
if (arg != NULL && !isQObject(arg))
if (arg != NULL && !isTQObject(arg))
{
failure.reason = WrongType;
failure.detail_obj = arg;
@ -3814,13 +3814,13 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
case 'Q':
{
/* Qt receiver to disconnect. */
/* TQt receiver to disconnect. */
va_arg(va, char *);
va_arg(va, void **);
va_arg(va, const char **);
if (arg != NULL && !isQObject(arg))
if (arg != NULL && !isTQObject(arg))
{
failure.reason = WrongType;
failure.detail_obj = arg;
@ -3839,7 +3839,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
va_arg(va, void **);
va_arg(va, const char **);
if (arg != NULL && (sipQtSupport == NULL || !PyCallable_Check(arg)))
if (arg != NULL && (sipTQtSupport == NULL || !PyCallable_Check(arg)))
{
failure.reason = WrongType;
failure.detail_obj = arg;
@ -3857,7 +3857,7 @@ static int parsePass1(PyObject **parseErrp, sipSimpleWrapper **selfp,
va_arg(va, void **);
va_arg(va, const char **);
if (arg != NULL && (sipQtSupport == NULL || !PyCallable_Check(arg)))
if (arg != NULL && (sipTQtSupport == NULL || !PyCallable_Check(arg)))
{
failure.reason = WrongType;
failure.detail_obj = arg;
@ -4572,7 +4572,7 @@ static int parsePass2(sipSimpleWrapper *self, int selfarg, PyObject *sipArgs,
case 'q':
{
/* Qt receiver to connect. */
/* TQt receiver to connect. */
char *sig = va_arg(va, char *);
void **rx = va_arg(va, void **);
@ -4592,7 +4592,7 @@ static int parsePass2(sipSimpleWrapper *self, int selfarg, PyObject *sipArgs,
case 'Q':
{
/* Qt receiver to disconnect. */
/* TQt receiver to disconnect. */
char *sig = va_arg(va, char *);
void **rx = va_arg(va, void **);
@ -4850,11 +4850,11 @@ static int parsePass2(sipSimpleWrapper *self, int selfarg, PyObject *sipArgs,
/*
* Return TRUE if an object is a QObject.
* Return TRUE if an object is a TQObject.
*/
static int isQObject(PyObject *obj)
static int isTQObject(PyObject *obj)
{
return (sipQtSupport != NULL && PyObject_TypeCheck(obj, sipTypeAsPyTypeObject(sipQObjectType)));
return (sipTQtSupport != NULL && PyObject_TypeCheck(obj, sipTypeAsPyTypeObject(sipTQObjectType)));
}
@ -6302,7 +6302,7 @@ static void sip_api_no_method(PyObject *parseErr, const char *scope,
/*
* Return a string/unicode object extracted from a particular line of a
* Return a string/tqunicode object extracted from a particular line of a
* docstring.
*/
static PyObject *signature_FromDocstring(const char *doc, SIP_SSIZE_T line)
@ -6339,7 +6339,7 @@ static PyObject *signature_FromDocstring(const char *doc, SIP_SSIZE_T line)
/*
* Return a string/unicode object that describes the given failure.
* Return a string/tqunicode object that describes the given failure.
*/
static PyObject *detail_FromFailure(PyObject *failure_obj)
{
@ -7363,8 +7363,8 @@ void *sipGetAddress(sipSimpleWrapper *sw)
/*
* Get the C/C++ pointer for a complex object. Note that not casting the C++
* pointer is a bug. However this is only ever called by PyQt3 signal emitter
* code and PyQt doesn't contain anything that multiply inherits from QObject.
* pointer is a bug. However this is only ever called by PyTQt3 signal emitter
* code and PyTQt doesn't contain anything that multiply inherits from TQObject.
*/
static void *sip_api_get_complex_cpp_ptr(sipSimpleWrapper *sw)
{
@ -8574,7 +8574,7 @@ static int sipSimpleWrapper_init(sipSimpleWrapper *self, PyObject *args,
/*
* Get any keyword handler if necessary. In SIP v5 this will be
* generalised and not PyQt specific.
* generalised and not PyTQt specific.
*/
if (!got_kw_handler)
{
@ -8584,9 +8584,9 @@ static int sipSimpleWrapper_init(sipSimpleWrapper *self, PyObject *args,
/*
* We are interested in unused keyword arguments if we are creating a
* QObject and we have a handler.
* TQObject and we have a handler.
*/
unused_p = (kw_handler != NULL && isQObject((PyObject *)self)) ? &unused : NULL;
unused_p = (kw_handler != NULL && isTQObject((PyObject *)self)) ? &unused : NULL;
unused = NULL;
/* Check there is no existing C++ instance waiting to be wrapped. */
@ -8914,7 +8914,7 @@ static void sipSimpleWrapper_dealloc(sipSimpleWrapper *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()).
*/
sipSimpleWrapper_clear(self);
@ -9189,7 +9189,7 @@ static int sipWrapper_clear(sipWrapper *self)
vret = sipSimpleWrapper_clear(sw);
/* Remove any slots connected via a proxy. */
if (sipQtSupport != NULL && sipPossibleProxy(sw))
if (sipTQtSupport != NULL && sipPossibleProxy(sw))
{
void *tx = sipGetAddress(sw);
@ -9198,7 +9198,7 @@ static int sipWrapper_clear(sipWrapper *self)
sipSlot *slot;
void *context = NULL;
while ((slot = sipQtSupport->qt_find_sipslot(tx, &context)) != NULL)
while ((slot = sipTQtSupport->qt_find_sipslot(tx, &context)) != NULL)
{
sip_api_clear_any_slot_reference(slot);
@ -9208,12 +9208,12 @@ static int sipWrapper_clear(sipWrapper *self)
}
}
/* Detach children (which will be owned by C/C++). */
/* Detach tqchildren (which will be owned by C/C++). */
while ((sw = (sipSimpleWrapper *)self->first_child) != NULL)
{
/*
* Although this object is being garbage collected it doesn't follow
* that it's children should be. So we make sure that the child stays
* that it's tqchildren should be. So we make sure that the child stays
* alive and remember we have done so.
*/
Py_INCREF(sw);
@ -9256,8 +9256,8 @@ static int sipWrapper_traverse(sipWrapper *self, visitproc visit, void *arg)
if ((vret = sipSimpleWrapper_traverse(sw, visit, arg)) != 0)
return vret;
/* This should be handwritten code in PyQt. */
if (sipQtSupport != NULL)
/* This should be handwritten code in PyTQt. */
if (sipTQtSupport != NULL)
{
void *tx = sipGetAddress(sw);
@ -9266,7 +9266,7 @@ static int sipWrapper_traverse(sipWrapper *self, visitproc visit, void *arg)
sipSlot *slot;
void *context = NULL;
while ((slot = sipQtSupport->qt_find_sipslot(tx, &context)) != NULL)
while ((slot = sipTQtSupport->qt_find_sipslot(tx, &context)) != NULL)
{
if ((vret = sip_api_visit_slot(slot, visit, arg)) != 0)
return vret;
@ -9672,7 +9672,7 @@ static void forgetObject(sipSimpleWrapper *sw)
* further calls that pass the instance as an argument. If this is
* still in the map then it's reference count would be increased (to
* one) and bad things happen when it drops back to zero again. (An
* example is PyQt events generated during the dtor call being passed
* example is PyTQt events generated during the dtor call being passed
* to an event filter implemented in Python.) By removing it from the
* map first we ensure that a new Python object is created.
*/
@ -9788,7 +9788,7 @@ static void *sip_api_import_symbol(const char *name)
/*
* Visit a slot connected to an object for the cyclic garbage collector. This
* is only called externally by PyQt3.
* is only called externally by PyTQt3.
*/
static int sip_api_visit_slot(sipSlot *slot, visitproc visit, void *arg)
{
@ -9802,7 +9802,7 @@ static int sip_api_visit_slot(sipSlot *slot, visitproc visit, void *arg)
/*
* Clear a slot if it has an extra reference to keep it alive. This is only
* called externally by PyQt3.
* called externally by PyTQt3.
*/
static void sip_api_clear_any_slot_reference(sipSlot *slot)
{
@ -9888,7 +9888,7 @@ static char sip_api_string_as_ascii_char(PyObject *obj)
#if PY_MAJOR_VERSION >= 3
"bytes or ASCII string of length 1 expected not '%s'",
#else
"string or ASCII unicode of length 1 expected not '%s'",
"string or ASCII tqunicode of length 1 expected not '%s'",
#endif
Py_TYPE(obj)->tp_name);
@ -9924,7 +9924,7 @@ static char sip_api_string_as_latin1_char(PyObject *obj)
#if PY_MAJOR_VERSION >= 3
"bytes or Latin-1 string of length 1 expected not '%s'",
#else
"string or Latin-1 unicode of length 1 expected not '%s'",
"string or Latin-1 tqunicode of length 1 expected not '%s'",
#endif
Py_TYPE(obj)->tp_name);
@ -9960,7 +9960,7 @@ static char sip_api_string_as_utf8_char(PyObject *obj)
#if PY_MAJOR_VERSION >= 3
"bytes or UTF-8 string of length 1 expected not '%s'",
#else
"string or UTF-8 unicode of length 1 expected not '%s'",
"string or UTF-8 tqunicode of length 1 expected not '%s'",
#endif
Py_TYPE(obj)->tp_name);
@ -10028,7 +10028,7 @@ static const char *sip_api_string_as_ascii_string(PyObject **obj)
#if PY_MAJOR_VERSION >= 3
"bytes or ASCII string expected not '%s'",
#else
"string or ASCII unicode expected not '%s'",
"string or ASCII tqunicode expected not '%s'",
#endif
Py_TYPE(s)->tp_name);
@ -10067,7 +10067,7 @@ static const char *sip_api_string_as_latin1_string(PyObject **obj)
#if PY_MAJOR_VERSION >= 3
"bytes or Latin-1 string expected not '%s'",
#else
"string or Latin-1 unicode expected not '%s'",
"string or Latin-1 tqunicode expected not '%s'",
#endif
Py_TYPE(s)->tp_name);
@ -10106,7 +10106,7 @@ static const char *sip_api_string_as_utf8_string(PyObject **obj)
#if PY_MAJOR_VERSION >= 3
"bytes or UTF-8 string expected not '%s'",
#else
"string or UTF-8 unicode expected not '%s'",
"string or UTF-8 tqunicode expected not '%s'",
#endif
Py_TYPE(s)->tp_name);
@ -10215,7 +10215,7 @@ static int parseBytes_AsString(PyObject *obj, const char **ap)
/*
* Convert a Python object to a wide character.
*/
static wchar_t sip_api_unicode_as_wchar(PyObject *obj)
static wchar_t sip_api_tqunicode_as_wchar(PyObject *obj)
{
wchar_t ch;
@ -10225,7 +10225,7 @@ static wchar_t sip_api_unicode_as_wchar(PyObject *obj)
#if PY_MAJOR_VERSION >= 3
"string"
#else
"unicode string"
"tqunicode string"
#endif
" of length 1 expected, not %s", Py_TYPE(obj)->tp_name);
@ -10239,7 +10239,7 @@ static wchar_t sip_api_unicode_as_wchar(PyObject *obj)
/*
* Convert a Python object to a wide character string on the heap.
*/
static wchar_t *sip_api_unicode_as_wstring(PyObject *obj)
static wchar_t *sip_api_tqunicode_as_wstring(PyObject *obj)
{
wchar_t *p;
@ -10249,7 +10249,7 @@ static wchar_t *sip_api_unicode_as_wstring(PyObject *obj)
#if PY_MAJOR_VERSION >= 3
"string"
#else
"unicode string"
"tqunicode string"
#endif
" expected, not %s", Py_TYPE(obj)->tp_name);
@ -10437,7 +10437,7 @@ static int convertToWCharString(PyObject *obj, wchar_t **ap)
/*
* Convert a Python object to a wide character.
*/
static int sip_api_unicode_as_wchar(PyObject *obj)
static int sip_api_tqunicode_as_wchar(PyObject *obj)
{
raiseNoWChar();
@ -10448,7 +10448,7 @@ static int sip_api_unicode_as_wchar(PyObject *obj)
/*
* Convert a Python object to a wide character.
*/
static int *sip_api_unicode_as_wstring(PyObject *obj)
static int *sip_api_tqunicode_as_wstring(PyObject *obj)
{
raiseNoWChar();

@ -927,7 +927,7 @@ class Makefile:
error("\"%s\" is missing from \"%s\"." % (i, bfname))
# Get the optional values.
for i in ("headers", "moc_headers"):
for i in ("headers", "tqmoc_headers"):
try:
bdict[i]
except KeyError:
@ -945,12 +945,12 @@ class Makefile:
root, discard = os.path.splitext(f)
olist.append(root + ext)
for f in bdict["moc_headers"].split():
for f in bdict["tqmoc_headers"].split():
if not self._qt:
error("\"%s\" defines \"moc_headers\" for a non-Qt module." % bfname)
error("\"%s\" defines \"tqmoc_headers\" for a non-Qt module." % bfname)
root, discard = os.path.splitext(f)
olist.append("moc_" + root + ext)
olist.append("tqmoc_" + root + ext)
bdict["objects"] = ' '.join(olist)
@ -967,9 +967,9 @@ class Makefile:
for f in build["objects"].split():
mfile.write("\t-%s %s\n" % (self.rm, f))
for f in build["moc_headers"].split():
for f in build["tqmoc_headers"].split():
root, discard = os.path.splitext(f)
mfile.write("\t-%s moc_%s.cpp\n" % (self.rm, root))
mfile.write("\t-%s tqmoc_%s.cpp\n" % (self.rm, root))
def ready(self):
"""The Makefile is now ready to be used.
@ -1056,7 +1056,7 @@ class Makefile:
mfile.write("LIBS = %s\n" % ' '.join(libs))
if self._qt:
mfile.write("MOC = %s\n" % _quote(self.required_string("MOC")))
mfile.write("TQMOC = %s\n" % _quote(self.required_string("TQMOC")))
if self._src_dir != self.dir:
mfile.write("VPATH = %s\n\n" % self._src_dir)
@ -1507,7 +1507,7 @@ class ModuleMakefile(Makefile):
mfile.write("TARGET = %s\n" % (self._target + "." + ext))
mfile.write("OFILES = %s\n" % self._build["objects"])
mfile.write("HFILES = %s %s\n" % (self._build["headers"], self._build["moc_headers"]))
mfile.write("HFILES = %s %s\n" % (self._build["headers"], self._build["tqmoc_headers"]))
mfile.write("\n")
if self.static:
@ -1536,12 +1536,12 @@ class ModuleMakefile(Makefile):
mfile.write("\nall: $(TARGET)\n")
mfile.write("\n$(OFILES): $(HFILES)\n")
for mf in self._build["moc_headers"].split():
for mf in self._build["tqmoc_headers"].split():
root, discard = os.path.splitext(mf)
cpp = "moc_" + root + ".cpp"
cpp = "tqmoc_" + root + ".cpp"
mfile.write("\n%s: %s\n" % (cpp, mf))
mfile.write("\t$(MOC) -o %s %s\n" % (cpp, mf))
mfile.write("\t$(TQMOC) -o %s %s\n" % (cpp, mf))
mfile.write("\n$(TARGET): $(OFILES)\n")
@ -1825,15 +1825,15 @@ class ProgramMakefile(Makefile):
mfile.write("\nall: $(TARGET)\n")
mfile.write("\n$(OFILES): $(HFILES)\n")
for mf in self._build["moc_headers"].split():
for mf in self._build["tqmoc_headers"].split():
root, _ = os.path.splitext(mf)
cpp = "moc_" + root + ".cpp"
cpp = "tqmoc_" + root + ".cpp"
if self._src_dir != self.dir:
mf = os.path.join(self._src_dir, mf)
mfile.write("\n%s: %s\n" % (cpp, mf))
mfile.write("\t$(MOC) -o %s %s\n" % (cpp, mf))
mfile.write("\t$(TQMOC) -o %s %s\n" % (cpp, mf))
mfile.write("\n$(TARGET): $(OFILES)\n")

@ -927,7 +927,7 @@ class Makefile:
error("\"%s\" is missing from \"%s\"." % (i, bfname))
# Get the optional values.
for i in ("headers", "moc_headers"):
for i in ("headers", "tqmoc_headers"):
try:
bdict[i]
except KeyError:
@ -945,12 +945,12 @@ class Makefile:
root, discard = os.path.splitext(f)
olist.append(root + ext)
for f in bdict["moc_headers"].split():
for f in bdict["tqmoc_headers"].split():
if not self._qt:
error("\"%s\" defines \"moc_headers\" for a non-Qt module." % bfname)
error("\"%s\" defines \"tqmoc_headers\" for a non-Qt module." % bfname)
root, discard = os.path.splitext(f)
olist.append("moc_" + root + ext)
olist.append("tqmoc_" + root + ext)
bdict["objects"] = ' '.join(olist)
@ -967,9 +967,9 @@ class Makefile:
for f in build["objects"].split():
mfile.write("\t-%s %s\n" % (self.rm, f))
for f in build["moc_headers"].split():
for f in build["tqmoc_headers"].split():
root, discard = os.path.splitext(f)
mfile.write("\t-%s moc_%s.cpp\n" % (self.rm, root))
mfile.write("\t-%s tqmoc_%s.cpp\n" % (self.rm, root))
def ready(self):
"""The Makefile is now ready to be used.
@ -1056,7 +1056,7 @@ class Makefile:
mfile.write("LIBS = %s\n" % ' '.join(libs))
if self._qt:
mfile.write("MOC = %s\n" % _quote(self.required_string("MOC")))
mfile.write("TQMOC = %s\n" % _quote(self.required_string("TQMOC")))
if self._src_dir != self.dir:
mfile.write("VPATH = %s\n\n" % self._src_dir)
@ -1507,7 +1507,7 @@ class ModuleMakefile(Makefile):
mfile.write("TARGET = %s\n" % (self._target + "." + ext))
mfile.write("OFILES = %s\n" % self._build["objects"])
mfile.write("HFILES = %s %s\n" % (self._build["headers"], self._build["moc_headers"]))
mfile.write("HFILES = %s %s\n" % (self._build["headers"], self._build["tqmoc_headers"]))
mfile.write("\n")
if self.static:
@ -1536,15 +1536,15 @@ class ModuleMakefile(Makefile):
mfile.write("\nall: $(TARGET)\n")
mfile.write("\n$(OFILES): $(HFILES)\n")
for mf in self._build["moc_headers"].split():
for mf in self._build["tqmoc_headers"].split():
root, _ = os.path.splitext(mf)
cpp = "moc_" + root + ".cpp"
cpp = "tqmoc_" + root + ".cpp"
if self._src_dir != self.dir:
mf = os.path.join(self._src_dir, mf)
mfile.write("\n%s: %s\n" % (cpp, mf))
mfile.write("\t$(MOC) -o %s %s\n" % (cpp, mf))
mfile.write("\t$(TQMOC) -o %s %s\n" % (cpp, mf))
mfile.write("\n$(TARGET): $(OFILES)\n")
@ -1828,15 +1828,15 @@ class ProgramMakefile(Makefile):
mfile.write("\nall: $(TARGET)\n")
mfile.write("\n$(OFILES): $(HFILES)\n")
for mf in self._build["moc_headers"].split():
for mf in self._build["tqmoc_headers"].split():
root, _ = os.path.splitext(mf)
cpp = "moc_" + root + ".cpp"
cpp = "tqmoc_" + root + ".cpp"
if self._src_dir != self.dir:
mf = os.path.join(self._src_dir, mf)
mfile.write("\n%s: %s\n" % (cpp, mf))
mfile.write("\t$(MOC) -o %s %s\n" % (cpp, mf))
mfile.write("\t$(TQMOC) -o %s %s\n" % (cpp, mf))
mfile.write("\n$(TARGET): $(OFILES)\n")

@ -61,7 +61,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -61,7 +61,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar -X64 cq

@ -46,7 +46,7 @@ QMAKE_LINK = xlC
QMAKE_LINK_THREAD = xlC_r
QMAKE_LINK_SHLIB = ld
QMAKE_LINK_SHLIB_CMD = makeC++SharedLib -p 0 \
-o $(TARGET) $(LFLAGS) $(OBJECTS) $(OBJMOC) $(LIBS)
-o $(TARGET) $(LFLAGS) $(OBJECTS) $(OBJTQMOC) $(LIBS)
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -48,7 +48,7 @@ QMAKE_LINK = xlC
QMAKE_LINK_THREAD = xlC_r
QMAKE_LINK_SHLIB = ld
QMAKE_LINK_SHLIB_CMD = makeC++SharedLib -p 0 -X 64 \
-o $(TARGET) $(LFLAGS) $(OBJECTS) $(OBJMOC) $(LIBS)
-o $(TARGET) $(LFLAGS) $(OBJECTS) $(OBJTQMOC) $(LIBS)
QMAKE_LFLAGS = -q64
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
@ -66,7 +66,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthreads
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar -X64 cq

@ -67,7 +67,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD =
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cqs

@ -69,7 +69,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cqs

@ -69,7 +69,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -60,7 +60,7 @@ QMAKE_LIBS_QT = -lqt
QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cq

@ -62,7 +62,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -62,7 +62,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -62,7 +62,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -87,7 +87,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -85,7 +85,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL -lXt
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -106,7 +106,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL -lXt
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -105,7 +105,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -83,7 +83,7 @@ QMAKE_LIBS_QT = -lqt
QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cqs

@ -67,7 +67,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -67,7 +67,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -104,7 +104,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL -lXt
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -104,7 +104,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL -lXt
QMAKE_LIBS_THREAD = -lpthread
QMAKE_LIBS_YACC = -ly
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -59,7 +59,7 @@ QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -93,7 +93,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lm
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = CC -ar -o

@ -93,7 +93,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lm
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = CC -ar -o

@ -70,7 +70,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu -lm
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = ar cq

@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -68,7 +68,7 @@ QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_QT =
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = arm-linux-ar cqs

@ -68,7 +68,7 @@ QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_QT =
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = arm-linux-ar cqs

@ -68,7 +68,7 @@ QMAKE_LIBS_OPENGL =
QMAKE_LIBS_OPENGL_QT =
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = arm-linux-ar cqs

@ -60,7 +60,7 @@ QMAKE_LIBS_NIS = -lnsl
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -68,7 +68,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -68,7 +68,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -71,7 +71,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -73,7 +73,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -73,7 +73,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -63,7 +63,7 @@ QMAKE_LIBS_OPENGL = -llibGLU -llibGL -llibXmu
QMAKE_LIBS_OPENGL_QT = -llibGL -llibXmu
QMAKE_LIBS_THREAD = -llibpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -68,7 +68,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -65,7 +65,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -77,7 +77,7 @@ QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -63,7 +63,7 @@ QMAKE_LIBS_THREAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -63,7 +63,7 @@ QMAKE_LIBS_THREAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -53,7 +53,7 @@ QMAKE_LINK_THREAD = xlc++_r
QMAKE_LINK_SHLIB = ld
#QMAKE_LINK_SHLIB_CMD = makeC++SharedLib -p 0 \
# -o $(TARGETD) \
# $(LFLAGS) $(OBJECTS) $(OBJMOC) $(LIBS); \
# $(LFLAGS) $(OBJECTS) $(OBJTQMOC) $(LIBS); \
# $(AR) lib$(QMAKE_TARGET).a $(TARGETD); \
# $(RANLIB) lib$(QMAKE_TARGET).a; \
# mv lib$(QMAKE_TARGET).a $(DESTDIR)
@ -74,7 +74,7 @@ QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
#QMAKE_LIBS_THREAD = -lpthreads
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -44,7 +44,7 @@ QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++
QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJTQMOC) $(LIBS)
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
@ -62,7 +62,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -46,7 +46,7 @@ QMAKE_LINK = g++
QMAKE_LINK_SHLIB = g++
QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $(LFLAGS) \
$$QMAKE_CFLAGS_SHLIB $$QMAKE_LFLAGS \
-o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
-o $(TARGETD) $(OBJECTS) $(OBJTQMOC) $(LIBS)
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
@ -63,7 +63,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar q

@ -63,7 +63,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -66,7 +66,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD =
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = CC -xar -o

@ -66,7 +66,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD =
QMAKE_MOC = $(QTDIR)/bin/moc
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc
QMAKE_UIC = $(QTDIR)/bin/uic
QMAKE_AR = CC -xar -o

@ -60,7 +60,7 @@ QMAKE_LIBS_X11SM = -lSM -lICE
QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -59,7 +59,7 @@ QMAKE_LIBS_X11 = -lXext -lX11 -lsocket -lm
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -65,7 +65,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread -lrt
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = CC -xar -o

@ -82,7 +82,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread -lrt
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = CC -xar -o

@ -69,7 +69,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread -lrt
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -86,7 +86,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread -lrt
QMAKE_LIBS_NETWORK = -lresolv -lsocket -lxnet
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -61,7 +61,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lrt
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -61,7 +61,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lpthread -lexc -lrt
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cqs

@ -66,7 +66,7 @@ QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD =
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -63,7 +63,7 @@ QMAKE_LIBS_OPENGL = -lGLU -lGL -lXt
QMAKE_LIBS_OPENGL_QT = -lGL
QMAKE_LIBS_THREAD = -lthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_TQMOC = $$[QT_INSTALL_BINS]/tqmoc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_AR = ar cq

@ -69,7 +69,7 @@ QMAKE_LIBS_QT_ENTRY = -lqtmain
#QMAKE_LIBS_OPENGL =
#QMAKE_LFLAGS_OPENGL = /dopengl32.dll
QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe

@ -86,7 +86,7 @@ isEqual(MINGW_IN_SHELL, 1) {
QMAKE_MKDIR = mkdir
QMAKE_DEL_DIR = rmdir
}
QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc.exe

@ -65,7 +65,7 @@ QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib delayimp.l
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe

@ -64,7 +64,7 @@ QMAKE_LIBS_OPENGL = opengl32.lib glu32.lib gdi32.lib user32.lib delayimp.l
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe

@ -64,7 +64,7 @@ QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32
QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe

@ -64,7 +64,7 @@ QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32
QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe

@ -64,7 +64,7 @@ QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32
QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
QMAKE_TQMOC = $$[QT_INSTALL_BINS]\tqmoc.exe
QMAKE_UIC = $$[QT_INSTALL_BINS]\uic.exe
QMAKE_IDC = $$[QT_INSTALL_BINS]\idc.exe

@ -52,7 +52,7 @@ QMAKE_LIBS_QT_ENTRY = %QTDIR%\lib\qtmain.lib
QMAKE_LIBS_OPENGL = opengl32.lib
QMAKE_MOC = $(QTDIR)/bin/moc.exe
QMAKE_TQMOC = $(QTDIR)/bin/tqmoc.exe
QMAKE_UIC = $(QTDIR)/bin/uic.exe
QMAKE_IDC = $(QTDIR)/bin/idc.exe

@ -162,7 +162,7 @@ Argument Annotations
encoding is ``"None"`` and the ``str`` type otherwise.
Python v2 will use the ``str`` type to represent the argument if the
encoding is ``"None"`` and the ``unicode`` type otherwise.
encoding is ``"None"`` and the ``tqunicode`` type otherwise.
.. argument-annotation:: GetWrapper

@ -202,13 +202,13 @@ specification files.
``u`` (long) [unsigned int]
Convert a C/C++ ``unsigned int`` to a Python long.
``w`` (unicode/string) [wchar_t]
Convert a C/C++ wide character to a Python v2 unicode object or a
``w`` (tqunicode/string) [wchar_t]
Convert a C/C++ wide character to a Python v2 tqunicode object or a
Python v3 string object.
``x`` (unicode/string) [wchar_t \*]
``x`` (tqunicode/string) [wchar_t \*]
Convert a C/C++ ``L'\0'`` terminated wide character string to a Python
v2 unicode object or a Python v3 string object. If the string pointer
v2 tqunicode object or a Python v3 string object. If the string pointer
is ``NULL`` then the result is ``Py_None``.
``A`` (string) [char \*]
@ -272,8 +272,8 @@ specification files.
Convert a named C/C++ ``enum`` to an instance of the corresponding
Python named enum type.
``G`` (unicode) [wchar_t \*, :cmacro:`SIP_SSIZE_T`]
Convert a C/C++ wide character array and its length to a Python unicode
``G`` (tqunicode) [wchar_t \*, :cmacro:`SIP_SSIZE_T`]
Convert a C/C++ wide character array and its length to a Python tqunicode
object. If the array is ``NULL`` then the length is ignored and the
result is ``Py_None``.
@ -1124,7 +1124,7 @@ specification files.
Convert a Python string-like object of length 1 to a C/C++ ``char``
according to the encoding ``e``. ``e`` can either be ``A`` for ASCII,
``L`` for Latin-1, or ``8`` for UTF-8. For Python v2 the object may be
either a string or a unicode object that can be encoded. For Python v3
either a string or a tqunicode object that can be encoded. For Python v3
the object may either be a bytes object or a string object that can be
encoded. An object that supports the buffer protocol may also be used.
@ -1182,12 +1182,12 @@ specification files.
``u`` (long) [unsigned int \*]
Convert a Python long to a C/C++ ``unsigned int``.
``w`` (unicode/string) [wchar_t \*]
Convert a Python v2 string or unicode object or a Python v3 string
``w`` (tqunicode/string) [wchar_t \*]
Convert a Python v2 string or tqunicode object or a Python v3 string
object of length 1 to a C/C++ wide character.
``x`` (unicode/string) [wchar_t \*\*]
Convert a Python v2 string or unicode object or a Python v3 string
``x`` (tqunicode/string) [wchar_t \*\*]
Convert a Python v2 string or tqunicode object or a Python v3 string
object to a C/C++ ``L'\0'`` terminated wide character string. If the
Python object is ``Py_None`` then the string is ``NULL``.
@ -1199,7 +1199,7 @@ specification files.
identifies the object in the context defined by the ``S`` format
character and allows an extra reference to the object to be kept to
ensure that the string remains valid. For Python v2 the object may be
either a string or a unicode object that can be encoded. For Python v3
either a string or a tqunicode object that can be encoded. For Python v3
the object may either be a bytes object or a string object that can be
encoded. An object that supports the buffer protocol may also be used.
@ -1258,8 +1258,8 @@ specification files.
``F`` (wrapped enum) [:ctype:`sipTypeDef` \*, enum \*]
Convert a Python named enum type to the corresponding C/C++ ``enum``.
``G`` (unicode/string) [wchar_t \*\*, :cmacro:`SIP_SSIZE_T` \*]
Convert a Python v2 string or unicode object or a Python v3 string
``G`` (tqunicode/string) [wchar_t \*\*, :cmacro:`SIP_SSIZE_T` \*]
Convert a Python v2 string or tqunicode object or a Python v3 string
object to a C/C++ wide character array and its length. If the Python
object is ``Py_None`` then the array and length are ``NULL`` and zero
respectively.
@ -1696,7 +1696,7 @@ name prefixed by ``sip``. For example, the derived class for class ``Klass``
is ``sipKlass``.
If a C++ class doesn't have any virtual or protected methods in it or any of
it's super-class hierarchy, or does not emit any Qt signals, then a derived
it's super-class hierarchy, or does not emit any Qt Q_SIGNALS, then a derived
class is not generated.
Most of the time handwritten code should ignore the derived classes. The only

@ -515,7 +515,7 @@ 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.
tqunicode objects to be used wherever ``QString`` instances are expected.
The following variables are made available to the handwritten code:

@ -74,7 +74,7 @@ SIP, and the bindings it produces, have the following features:
- support for C++ exceptions and wrapping them as Python exceptions
- the automatic generation of complementary rich comparison slots
- the automatic generation of complementary rich comparison Q_SLOTS
- support for deprecation warnings
@ -164,6 +164,6 @@ toolkit.
The SIP code generator understands the signal/slot type safe callback mechanism
that Qt uses to connect objects together. This allows applications to define
new Python signals, and allows any Python callable object to be used as a slot.
new Python Q_SIGNALS, and allows any Python callable object to be used as a slot.
SIP itself does not require Qt to be installed.

@ -130,15 +130,15 @@ file.
*class-variable* |
**public:** |
**public Q_SLOTS:** |
**public slots:** |
**public Q_SLOTS:** |
**protected:** |
**protected Q_SLOTS:** |
**protected slots:** |
**protected Q_SLOTS:** |
**private:** |
**private Q_SLOTS:** |
**private slots:** |
**private Q_SLOTS:** |
**Q_SIGNALS:** |
**signals:**]
**Q_SIGNALS:**]
*constructor* ::= [**explicit**] *name* **(** [*argument-list*] **)**
[*exceptions*] [*function-annotations*]

@ -284,7 +284,7 @@ previous examples.
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 a
hierachy. When an object is destroyed all of its children are also
hierachy. When an object is destroyed all of its tqchildren are also
automatically destroyed. It is important, therefore, that the Python
garbage collector doesn't also try and destroy them. This is covered in
more detail in :ref:`ref-object-ownership`. SIP provides many other
@ -552,8 +552,8 @@ Support for Wide Characters
---------------------------
SIP v4.6 introduced support for wide characters (i.e. the ``wchar_t`` type).
Python's C API includes support for converting between unicode objects and wide
character strings and arrays. When converting from a unicode object to wide
Python's C API includes support for converting between tqunicode objects and wide
character strings and arrays. When converting from a tqunicode object to wide
characters SIP creates the string or array on the heap (using memory allocated
using :cfunc:`sipMalloc()`). This then raises the problem of how this memory
is subsequently freed.

Loading…
Cancel
Save