aboutsummaryrefslogtreecommitdiffstats
path: root/libpyside/pysideproperty.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-11-01 18:42:47 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:20 -0300
commit2a87b74bfea936691db2eb97a8ab2788277869b6 (patch)
treeb4ec4ef4b62df6bf488301e243501ceac960fa46 /libpyside/pysideproperty.cpp
parent792504f978441d0a7708ebdaabc4b4baf24fdff4 (diff)
Replaced TypeResolver by SbkConverter and SpecificConverter.
Also updated QtGui's WId conversion to Python 3.
Diffstat (limited to 'libpyside/pysideproperty.cpp')
-rw-r--r--libpyside/pysideproperty.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libpyside/pysideproperty.cpp b/libpyside/pysideproperty.cpp
index 4d253e88f..e5ae5d525 100644
--- a/libpyside/pysideproperty.cpp
+++ b/libpyside/pysideproperty.cpp
@@ -104,8 +104,10 @@ PyTypeObject PySidePropertyType = {
static void qpropertyMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::Call call, void** args)
{
- Shiboken::TypeResolver* typeResolver = Shiboken::TypeResolver::get(pp->d->typeName);
- Q_ASSERT(typeResolver);
+ Shiboken::Conversions::SpecificConverter converter(pp->d->typeName);
+ Q_ASSERT(converter);
+
+ QByteArray type(pp->d->typeName);
switch(call) {
case QMetaObject::ReadProperty:
@@ -113,7 +115,7 @@ static void qpropertyMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::C
Shiboken::GilState gil;
PyObject* value = PySide::Property::getValue(pp, self);
if (value) {
- typeResolver->toCpp(value, &args[0]);
+ converter.toCpp(value, args[0]);
Py_DECREF(value);
} else if (PyErr_Occurred()) {
PyErr_Print(); // Clear any errors but print them to stderr
@@ -124,7 +126,7 @@ static void qpropertyMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::C
case QMetaObject::WriteProperty:
{
Shiboken::GilState gil;
- Shiboken::AutoDecRef value(typeResolver->toPython(args[0]));
+ Shiboken::AutoDecRef value(converter.toPython(args[0]));
PySide::Property::setValue(pp, self, value);
break;
}