Revision 86e5c917
Von Christian Ehringfeld vor mehr als 8 Jahren hinzugefügt
src/entityhelper.cpp | ||
---|---|---|
}
|
||
return prop;
|
||
}
|
||
|
||
QHash<QString, QVariant> EntityHelper::getEntityAttributes(
|
||
const QHash<QString, QMetaProperty>
|
||
&props,
|
||
const QSharedPointer<Entity> &entity) {
|
||
auto map = QHash<QString, QVariant>();
|
||
auto transientAttrs = entity->getTransientAttributes();
|
||
auto relations = entity->getRelations();
|
||
auto i = props.constBegin();
|
||
while (i != props.constEnd()) {
|
||
if (!transientAttrs.contains(i.key()) && !relations.contains(i.key())) {
|
||
map.insert(i.key(), i.value().read(entity.data()));
|
||
}
|
||
++i;
|
||
}
|
||
return map;
|
||
}
|
Auch abrufbar als: Unified diff
not working wip...