Adapt to changes in AutoDecRef class

Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
This commit is contained in:
Hugo Lima 2010-02-01 18:58:46 -02:00
commit e4919faa31

View file

@ -277,9 +277,9 @@ int PySide::SignalManager::qt_metacall(QObject* object, QMetaObject::Call call,
methodName = methodName.left(methodName.indexOf('(')); methodName = methodName.left(methodName.indexOf('('));
Shiboken::AutoDecRef pyMethod(PyObject_GetAttrString(self, qPrintable(methodName))); Shiboken::AutoDecRef pyMethod(PyObject_GetAttrString(self, qPrintable(methodName)));
if (pyMethod) { if (!pyMethod.isNull()) {
Shiboken::AutoDecRef retval(PyObject_CallObject(pyMethod, preparedArgs)); Shiboken::AutoDecRef retval(PyObject_CallObject(pyMethod, preparedArgs));
if (!retval) if (retval.isNull())
qWarning() << "Error calling slot" << methodName; qWarning() << "Error calling slot" << methodName;
} else { } else {
qWarning() << "Dynamic slot" << methodName << "not found!"; qWarning() << "Dynamic slot" << methodName << "not found!";