From 1f1fbfbfa8149412f336f86e2a5bff0602a56dd5 Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Thu, 6 Oct 2011 11:39:08 -0300 Subject: Updated QtScript modue to works with python 2.x and 3.x --- PySide/QtScript/typesystem_script.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'PySide') 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 @@ 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 @@ 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 { -- cgit v1.2.3