From 58fb1c705c7c3e6fae2aa4f295991d005f4e63ae Mon Sep 17 00:00:00 2001 From: Renato Filho Date: Tue, 22 Mar 2011 11:12:33 -0300 Subject: Only raise 'RuntimeError' for function call to avoid problems with contructor order calls. --- libpyside/pyside.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libpyside') diff --git a/libpyside/pyside.cpp b/libpyside/pyside.cpp index 7fe39ead7..ec710a517 100644 --- a/libpyside/pyside.cpp +++ b/libpyside/pyside.cpp @@ -228,10 +228,10 @@ void initQObjectSubType(SbkObjectType* type, PyObject* args, PyObject* kwds) PyObject* getMetaDataFromQObject(QObject* cppSelf, PyObject* self, PyObject* name) { - if (!Shiboken::Object::isValid(self)) - return 0; - PyObject* attr = PyObject_GenericGetAttr(self, name); + if (!Shiboken::Object::isValid(reinterpret_cast(self), false)) + return attr; + if (attr && Property::isPropertyType(attr)) { PyObject *value = Property::getValue(reinterpret_cast(attr), self); if (!value) -- cgit v1.2.3