aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-08-20 16:37:41 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-08-20 18:10:30 -0300
commit662800956b935bf344dfb8cbfb47f2c3b5717aec (patch)
tree6fae6207088479b49e5995ede1a01eecf70997a4 /PySide
parent0576d04403cd02e08bc6c8d71c30f4abc186f95e (diff)
Use AutoPointerArray to dynamic array creation.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtCore/typesystem_core.xml6
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml9
2 files changed, 10 insertions, 5 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index f1c4cf2f8..1e371f026 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -127,10 +127,12 @@
<primitive-type name="unsigned int" default-constructor="0"/>
<primitive-type name="signed long" default-constructor="0"/>
<primitive-type name="long"/>
- <primitive-type name="unsigned long" default-constructor="0"/>
- <primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
+ <primitive-type name="unsigned long" default-constructor="0">
<!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
<include file-name="signalmanager.h" location="global"/>
+ </primitive-type>
+ <primitive-type name="Qt::HANDLE" target-lang-api-name="PyLong">
+ <!-- FIXME APIExtractor or shiboken do not support multiple includes by primitive type -->
<include file-name="QTextDocument" location="global"/>
</primitive-type>
<primitive-type name="QBool" target-lang-api-name="PyBool">
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 111096488..80122c297 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -2587,7 +2587,10 @@
<!-- TODO: Support conversions on virtual function -->
<modify-function signature="drawItems(QPainter*, int, QGraphicsItem**, const QStyleOptionGraphicsItem*)">
-
+ <extra-includes>
+ <include file-name="autoarraypointer.h" location="global"/>
+ </extra-includes>
+
<modify-argument index="2">
<remove-argument/>
<conversion-rule class="native">
@@ -2599,7 +2602,7 @@
<replace-type modified-type="PySequence"/>
<conversion-rule class="native">
int numItems = PySequence_Size(%PYARG_1);
- QGraphicsItem *%out[numItems];
+ PySide::AutoArrayPointer&lt;QGraphicsItem*&gt; %out(numItems);
for (int i=0; i &lt; numItems; i++) {
%out[i] = %CONVERTTOCPP[QGraphicsItem*](PySequence_Fast_GET_ITEM(%PYARG_1, i));
}
@@ -2626,7 +2629,7 @@
<conversion-rule class="native">
int numOptions = PySequence_Size(%PYARG_2);
- QStyleOptionGraphicsItem %out[numOptions];
+ PySide::AutoArrayPointer&lt;QStyleOptionGraphicsItem&gt; %out(numOptions);
for (int i=0; i &lt; numOptions; i++) {
%out[i] = %CONVERTTOCPP[QStyleOptionGraphicsItem](PySequence_Fast_GET_ITEM(%PYARG_1, i));
}