Revision b81ed01e
Von Christian Ehringfeld vor mehr als 8 Jahren hinzugefügt
- ID b81ed01eaf96379b7c0d1a24221f8ff56fdd93b5
- Vorgänger efe7a06f
| src/entityinspector.cpp | ||
|---|---|---|
|
|
||
|
bool EntityInspector::checkRegisteredEntities() {
|
||
|
QStringList classes = EntityInstanceFactory::getRegisteredClasses();
|
||
|
classes.sort();
|
||
|
QString msg = QDateTime::currentDateTime().toString(Qt::ISODate) +
|
||
|
" - Start checking entities\n";
|
||
|
this->logger->logMsg(msg, MsgType::INFO);
|
||
| src/entityinstancefactory.cpp | ||
|---|---|---|
|
return *reinterpret_cast<QSharedPointer<Entity>*>(entity.data());
|
||
|
}
|
||
|
|
||
|
//QSharedPointer<Entity> EntityInstanceFactory::castQVariant(
|
||
|
// QVariant &entity) {
|
||
|
// auto e = entity.value<QSharedPointer<Entity>>();
|
||
|
// if(!e) {
|
||
|
// auto ne = *static_cast<QSharedPointer<QObject>*>(entity.data());
|
||
|
// auto entityPtr = ne.objectCast<Entity>();
|
||
|
// if(entityPtr) {
|
||
|
// e = entityPtr;
|
||
|
// }
|
||
|
// }
|
||
|
// return e;
|
||
|
//}
|
||
|
|
||
|
QStringList EntityInstanceFactory::getRegisteredClasses() {
|
||
|
QStringList registered = QStringList();
|
||
|
for (auto i = EntityInstanceFactory::instance.constBegin();
|
||
Auch abrufbar als: Unified diff
improvement