Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ca25da8b

Von Christian Ehringfeld vor etwa 9 Jahren hinzugefügt

  • ID ca25da8b3279e398ea64ed3ebfb32690324643f3
  • Vorgänger 8925defa
  • Nachfolger 6be60ddf

small fix

Unterschiede anzeigen:

src/entityinstancefactory.cpp
if (metaTypeId != QMetaType::UnknownType) {
auto metaObject = QMetaType::metaObjectForType(metaTypeId);
if (metaObject) {
e = qobject_cast<Entity *>(metaObject->newInstance());
e = qobject_cast<Entity *>(EntityInstanceFactory::createObject(metaObject->className()));
if(!e) {
e = qobject_cast<Entity *>(metaObject->newInstance());
qDebug() << "Backup method for dynamic object creation was called. Maybe the class " +
metaObject->className()+"isn't registered?";
}
} else {
void *newObj = QMetaType::create(metaTypeId);
if (newObj) {
......
}
}
QList<QSharedPointer<Entity> > EntityInstanceFactory::castQVariantList(
QVariant &list) {
QList<QSharedPointer<Entity>> EntityInstanceFactory::castQVariantList(
QVariant &list) {
return *reinterpret_cast<QList<QSharedPointer<Entity>>*>(list.data());
}

Auch abrufbar als: Unified diff