diff options
-rw-r--r-- | PySide/QtScript/typesystem_script.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/PySide/QtScript/typesystem_script.xml b/PySide/QtScript/typesystem_script.xml index d0175561b..f208ac258 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 { |