summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-04 19:46:25 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2011-12-09 19:25:35 -0300
commitb6b5212be5f12fade45b92d790f144f37e17cd64 (patch)
tree15931764699b3cc450c92880ff2c2aadd5918a30
parent9468253d0346c72c6bb34a9b58146252e7142490 (diff)
downloadpyside-b6b5212be5f12fade45b92d790f144f37e17cd64.tar.gz
pyside-b6b5212be5f12fade45b92d790f144f37e17cd64.tar.xz
pyside-b6b5212be5f12fade45b92d790f144f37e17cd64.zip
Signature of various added and modified functions modified to use non-const references.
The API Extractor signature normalizer removes const& from argument types, but it leaves non-const references unchanged.
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml18
-rw-r--r--PySide/QtOpenGL/typesystem_opengl.xml12
2 files changed, 13 insertions, 17 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index e4a6f44..ac28898 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -225,7 +225,7 @@
<insert-template name="fix_bool*"/>
</inject-code>
</modify-function>
- <add-function signature="quadToQuad(const QPolygonF&amp;, const QPolygonF&amp;)" return-type="PyObject*" static="true">
+ <add-function signature="quadToQuad(QPolygonF&amp;, QPolygonF&amp;)" return-type="PyObject*" static="true">
<inject-code>
QTransform _result;
if (QTransform::quadToQuad(%1, %2, _result)) {
@@ -236,7 +236,7 @@
}
</inject-code>
</add-function>
- <add-function signature="quadToSquare(const QPolygonF &amp;)" return-type="PyObject*" static="true">
+ <add-function signature="quadToSquare(QPolygonF &amp;)" return-type="PyObject*" static="true">
<inject-code>
QTransform _result;
if (QTransform::quadToSquare(%1, _result)) {
@@ -248,7 +248,7 @@
</inject-code>
</add-function>
- <add-function signature="squareToQuad(const QPolygonF &amp;)" return-type="PyObject*" static="true">
+ <add-function signature="squareToQuad(QPolygonF &amp;)" return-type="PyObject*" static="true">
<inject-code>
QTransform _result;
if (QTransform::squareToQuad(%1, _result)) {
@@ -1008,14 +1008,14 @@
</inject-code>
</modify-function>
- <add-function signature="QImage(QString,int,int,int,QImage::Format)">
+ <add-function signature="QImage(QString&amp;,int,int,int,QImage::Format)">
<inject-code>
<insert-template name="qimage_buffer_constructor">
<replace from="%ARGS" to="%2, %3, %4, %5" />
</insert-template>
</inject-code>
</add-function>
- <add-function signature="QImage(QString,int,int,QImage::Format)">
+ <add-function signature="QImage(QString&amp;,int,int,QImage::Format)">
<inject-code>
<insert-template name="qimage_buffer_constructor">
<replace from="%ARGS" to="%2, %3, %4" />
@@ -2371,7 +2371,7 @@
<!-- ### "setNoReplayFor(QWidget*)" is an internal method. -->
<modify-function signature="setNoReplayFor(QWidget*)" remove="all" />
- <add-function signature="addAction(const QString&amp;, PyObject*, const QKeySequence&amp;)">
+ <add-function signature="addAction(QString&amp;, PyObject*, QKeySequence&amp;)">
<modify-argument index="3">
<replace-default-expression with="0" />
</modify-argument>
@@ -2384,7 +2384,7 @@
</inject-code>
</add-function>
- <add-function signature="addAction(const QIcon&amp;, const QString&amp;, PyObject*, const QKeySequence&amp;)">
+ <add-function signature="addAction(QIcon&amp;, QString&amp;, PyObject*, QKeySequence&amp;)">
<modify-argument index="4">
<replace-default-expression with="0" />
</modify-argument>
@@ -2487,7 +2487,7 @@
</object-type>
<object-type name="QPixmapCache">
<value-type name="Key"/>
- <add-function signature="find(QPixmapCache::Key)">
+ <add-function signature="find(QPixmapCache::Key&amp;)">
<inject-code>
QPixmap p;
if (%CPPSELF.%FUNCTION_NAME(%1, &amp;p)) {
@@ -2522,7 +2522,7 @@
</object-type>
<object-type name="QShortcut">
- <add-function signature="QShortcut(const QKeySequence&amp;, QWidget*, PyCallable*, Qt::ShortcutContext)">
+ <add-function signature="QShortcut(QKeySequence&amp;, QWidget*, PyCallable*, Qt::ShortcutContext)">
<modify-argument index="4">
<replace-default-expression with="Qt::WindowShortcut"/>
</modify-argument>
diff --git a/PySide/QtOpenGL/typesystem_opengl.xml b/PySide/QtOpenGL/typesystem_opengl.xml
index 0a1579c..043b2f5 100644
--- a/PySide/QtOpenGL/typesystem_opengl.xml
+++ b/PySide/QtOpenGL/typesystem_opengl.xml
@@ -657,15 +657,13 @@
<enum-type name="UsagePattern" since="4.7"/>
<modify-function signature="allocate(const void*, int)">
<modify-argument index="1">
- <replace-type modified-type="const QByteArray&amp;"/>
+ <replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
<modify-argument index="2">
<replace-default-expression with="-1"/>
</modify-argument>
<inject-code class="target" position="beginning">
- int size = %2;
- if (size &lt; 0)
- size = %1.size();
+ int size = (%2 &lt; 0) ? %1.size() : %2;
%CPPSELF.allocate((const void*) %1.data(), size);
</inject-code>
</modify-function>
@@ -703,15 +701,13 @@
</modify-function>
<modify-function signature="write(int, const void*, int)">
<modify-argument index="2">
- <replace-type modified-type="const QByteArray&amp;"/>
+ <replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
<modify-argument index="3">
<replace-default-expression with="-1"/>
</modify-argument>
<inject-code class="target" position="beginning">
- int size = %3;
- if (size &lt; 0)
- size = %2.size();
+ int size = (%3 &lt; 0) ? %2.size() : %3;
%CPPSELF.write(%1, (const void*) %2.data(), size);
</inject-code>
</modify-function>