Revision bb5e9339
Von Sebastian Diel vor etwa 9 Jahren hinzugefügt
src/entityinstancefactory.cpp | ||
---|---|---|
return EntityInstanceFactory::createInstance(className.toUtf8().constData());
|
||
}
|
||
|
||
Entity *EntityInstanceFactory::createInstance(int id) {
|
||
Entity *EntityInstanceFactory::createInstance(int metaTypeId) {
|
||
Entity *e = 0;
|
||
if (id != -1) {
|
||
e = static_cast<Entity *>(QMetaType::create(id));
|
||
if (metaTypeId != -1) {
|
||
e = static_cast<Entity *>(QMetaType::create(metaTypeId));
|
||
}
|
||
return e;
|
||
}
|
Auch abrufbar als: Unified diff
Bei Sebastian