Adjusted after dropping obsolete Qt2's QList class.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 4 years ago
parent dda6304c50
commit 7ba42131b7
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -370,7 +370,7 @@ PyObject \*sipTransferObj
The handwritten code must explicitly return a ``PyObject *``. If there was an The handwritten code must explicitly return a ``PyObject *``. If there was an
error then a Python exception must be raised and ``NULL`` returned. error then a Python exception must be raised and ``NULL`` returned.
The following example converts a ``QList<QWidget *>`` instance to a Python The following example converts a ``QPtrList<QWidget *>`` instance to a Python
list of ``QWidget`` instances:: list of ``QWidget`` instances::
%ConvertFromTypeCode %ConvertFromTypeCode
@ -559,7 +559,7 @@ returned.
:ref:`ref-derived-classes`. :ref:`ref-derived-classes`.
The following example converts a Python list of ``QPoint`` instances to a The following example converts a Python list of ``QPoint`` instances to a
``QList<QPoint>`` instance:: ``QPtrList<QPoint>`` instance::
%ConvertToTypeCode %ConvertToTypeCode
// See if we are just being asked to check the type of the Python // See if we are just being asked to check the type of the Python
@ -584,7 +584,7 @@ The following example converts a Python list of ``QPoint`` instances to a
} }
// Create the instance on the heap. // Create the instance on the heap.
QList<QPoint> *ql = new QList<QPoint>; QPtrList<QPoint> *ql = new QPtrList<QPoint>;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
@ -1307,11 +1307,11 @@ object.
For example:: For example::
template<Type *> template<Type *>
%MappedType QList %MappedType QPtrList
{ {
%TypeHeaderCode %TypeHeaderCode
// Include the library interface to the type being mapped. // Include the library interface to the type being mapped.
#include <qlist.h> #include <qptrlist.h>
%End %End
%ConvertToTypeCode %ConvertToTypeCode
@ -1334,7 +1334,7 @@ For example::
} }
// Create the instance on the heap. // Create the instance on the heap.
QList<Type *> *ql = new QList<Type *>; QPtrList<Type *> *ql = new QPtrList<Type *>;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
@ -1395,7 +1395,7 @@ For example::
%End %End
} }
Using this we can use, for example, ``QList<QObject *>`` throughout the Using this we can use, for example, ``QPtrList<QObject *>`` throughout the
module's specification files (and in any module that imports this one). The module's specification files (and in any module that imports this one). The
generated code will automatically map this to and from a Python list of QObject generated code will automatically map this to and from a Python list of QObject
instances when appropriate. instances when appropriate.

@ -1249,7 +1249,7 @@ object.</p>
{ {
%TypeHeaderCode %TypeHeaderCode
// Include the library interface to the type being mapped. // Include the library interface to the type being mapped.
#include &lt;qlist.h&gt; #include &lt;qptrlist.h&gt;
%End %End
%ConvertToTypeCode %ConvertToTypeCode

@ -370,7 +370,7 @@ PyObject \*sipTransferObj
The handwritten code must explicitly return a ``PyObject *``. If there was an The handwritten code must explicitly return a ``PyObject *``. If there was an
error then a Python exception must be raised and ``NULL`` returned. error then a Python exception must be raised and ``NULL`` returned.
The following example converts a ``QList<QWidget *>`` instance to a Python The following example converts a ``QPtrList<QWidget *>`` instance to a Python
list of ``QWidget`` instances:: list of ``QWidget`` instances::
%ConvertFromTypeCode %ConvertFromTypeCode
@ -559,7 +559,7 @@ returned.
:ref:`ref-derived-classes`. :ref:`ref-derived-classes`.
The following example converts a Python list of ``QPoint`` instances to a The following example converts a Python list of ``QPoint`` instances to a
``QList<QPoint>`` instance:: ``QPtrList<QPoint>`` instance::
%ConvertToTypeCode %ConvertToTypeCode
// See if we are just being asked to check the type of the Python // See if we are just being asked to check the type of the Python
@ -584,7 +584,7 @@ The following example converts a Python list of ``QPoint`` instances to a
} }
// Create the instance on the heap. // Create the instance on the heap.
QList<QPoint> *ql = new QList<QPoint>; QPtrList<QPoint> *ql = new QPtrList<QPoint>;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
@ -1307,11 +1307,11 @@ object.
For example:: For example::
template<Type *> template<Type *>
%MappedType QList %MappedType QPtrList
{ {
%TypeHeaderCode %TypeHeaderCode
// Include the library interface to the type being mapped. // Include the library interface to the type being mapped.
#include <qlist.h> #include <qptrlist.h>
%End %End
%ConvertToTypeCode %ConvertToTypeCode
@ -1334,7 +1334,7 @@ For example::
} }
// Create the instance on the heap. // Create the instance on the heap.
QList<Type *> *ql = new QList<Type *>; QPtrList<Type *> *ql = new QPtrList<Type *>;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{ {
@ -1395,7 +1395,7 @@ For example::
%End %End
} }
Using this we can use, for example, ``QList<QObject *>`` throughout the Using this we can use, for example, ``QPtrList<QObject *>`` throughout the
module's specification files (and in any module that imports this one). The module's specification files (and in any module that imports this one). The
generated code will automatically map this to and from a Python list of QObject generated code will automatically map this to and from a Python list of QObject
instances when appropriate. instances when appropriate.

Loading…
Cancel
Save