Replace useless check by a assert.
QMetaObject must already be ready at this point.
This commit is contained in:
parent
1464dc1022
commit
1422aed616
1 changed files with 1 additions and 4 deletions
|
|
@ -105,10 +105,7 @@ int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor,
|
||||||
}
|
}
|
||||||
|
|
||||||
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
|
QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj)));
|
||||||
if (!metaObject) {
|
Q_ASSERT(metaObject);
|
||||||
PyErr_SetString(PyExc_TypeError, "FIXME: metaobject not initialized, this error msg should not exists at all!!");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// All ready... now the ugly code begins... :-)
|
// All ready... now the ugly code begins... :-)
|
||||||
pyTypes[nextType] = pyObj;
|
pyTypes[nextType] = pyObj;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue