aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-01 13:12:49 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:41 -0300
commit151111bde2fcf7ab182495da16b3799fa2edf123 (patch)
tree2063f5be951f5bc377ee8e2a7d95724c55bd1185
parent8d8c4cf308c6e066a4e625ff2a05c11e7b9fba0b (diff)
Replaced hard coded variables by type system variables in QtCore and QtGui.
-rw-r--r--PySide/QtCore/typesystem_core.xml10
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml2
2 files changed, 6 insertions, 6 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 93e42ee14..6ca205aea 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -1664,7 +1664,7 @@
<modify-function signature="operator+(QByteArray,QString)" remove="all" />
<add-function signature="operator+(PyUnicode)">
<inject-code>
- Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(arg));
+ Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(%PYARG_1));
if (!str.isNull()) {
QByteArray b(PyString_AS_STRING(str.object()), PyString_GET_SIZE(str.object()));
b.prepend(*%CPPSELF);
@@ -1674,7 +1674,7 @@
</add-function>
<add-function signature="operator+(PyUnicode, QByteArray)">
<inject-code>
- Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(arg));
+ Shiboken::AutoDecRef str(PyUnicode_AsASCIIString(%PYARG_1));
if (!str.isNull()) {
QByteArray b(PyString_AS_STRING(str.object()), PyString_GET_SIZE(str.object()));
b.append(*%CPPSELF);
@@ -1684,7 +1684,7 @@
</add-function>
<add-function signature="operator+(PyString, QByteArray)">
<inject-code>
- QByteArray b(PyString_AS_STRING(arg), PyString_GET_SIZE(arg));
+ QByteArray b(PyString_AS_STRING(%PYARG_1), PyString_GET_SIZE(%PYARG_1));
%PYARG_0 = %CONVERTTOPYTHON[QByteArray](b + *%CPPSELF);
</inject-code>
</add-function>
@@ -1712,7 +1712,7 @@
<modify-function signature="QByteArray(const char *)">
<!-- Keep \x00 bytes passed in python strings -->
<inject-code class="target" position="beginning">
- int size = PyString_GET_SIZE(pyargs[0]);
+ int size = PyString_GET_SIZE(%PYARG_1);
%0 = new QByteArray(%1, size);
</inject-code>
</modify-function>
@@ -2244,7 +2244,7 @@
const_cast&lt;char*>("OsO"),
pyTimer,
SIGNAL(timeout()),
- pyargs[1])
+ %PYARG_2)
);
}
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 69929e808..279670898 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -562,7 +562,7 @@
</conversion-rule>
<conversion-rule class="native">
Py_ssize_t bufferLen;
- char* %out = (char*) Shiboken::Buffer::getPointer(arg, &amp;bufferLen);
+ char* %out = (char*) Shiboken::Buffer::getPointer(%PYARG_1, &amp;bufferLen);
</conversion-rule>
</modify-argument>
<modify-argument index="2">