summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-10-06 11:39:08 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-10-06 15:43:32 -0300
commit78540b73645110a155510f1cd4fa2b9feea9c34c (patch)
tree91bee88aa050b8681e461093807936c4be6b654d
parent0647ae2b88f08ac9a1894afe8a756965ad4133bf (diff)
downloadpyside-78540b73645110a155510f1cd4fa2b9feea9c34c.tar.gz
pyside-78540b73645110a155510f1cd4fa2b9feea9c34c.tar.xz
pyside-78540b73645110a155510f1cd4fa2b9feea9c34c.zip
Updated QtScript modue to works with python 2.x and 3.x
-rw-r--r--PySide/QtScript/typesystem_script.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/PySide/QtScript/typesystem_script.xml b/PySide/QtScript/typesystem_script.xml
index d017556..f208ac2 100644
--- a/PySide/QtScript/typesystem_script.xml
+++ b/PySide/QtScript/typesystem_script.xml
@@ -62,7 +62,7 @@
<inject-code class="target" position="beginning">
if (%CPPSELF.isVariant() || %CPPSELF.isString()) {
QString format = QString().sprintf("%s(\"%s\")", ((PyObject*)%PYSELF)->ob_type->tp_name, qPrintable(%CPPSELF.toString()));
- %PYARG_0 = PyString_FromString(qPrintable(format));
+ %PYARG_0 = Shiboken::String::fromCString(qPrintable(format));
} else {
%PYARG_0 = PyObject_Str((PyObject*)%PYSELF);
}
@@ -71,7 +71,7 @@
<add-function signature="__mgetitem__">
<inject-code>
Shiboken::AutoDecRef key(PyObject_Str(_key));
- QVariant res = %CPPSELF.property(PyString_AS_STRING(key.object())).toVariant();
+ QVariant res = %CPPSELF.property(Shiboken::String::toCString(key.object())).toVariant();
if (res.isValid()) {
return %CONVERTTOPYTHON[QVariant](res);
} else {