Revision 23337ecc
Von Christian Ehringfeld vor mehr als 8 Jahren hinzugefügt
src/entityhelper.cpp | ||
---|---|---|
auto e = list.at(i);
|
||
if (e->getId() == remove->getId()) {
|
||
list.removeAt(i);
|
||
EntityHelper::setListProperty(entity, list, property);
|
||
break;
|
||
}
|
||
}
|
||
EntityHelper::setListProperty(entity, list, property);
|
||
}
|
||
}
|
||
|
||
void EntityHelper::clearEntityListProperty(const QSharedPointer<Entity> &entity,
|
||
const QMetaProperty &property) {
|
||
QVariant var = property.read(entity.data());
|
||
if (var.canConvert<QList<QVariant>>()) {
|
||
auto list = EntityInstanceFactory::castQVariantList(var);
|
||
list.clear();
|
||
EntityHelper::setListProperty(entity, list, property);
|
||
}
|
||
}
|
||
|
Auch abrufbar als: Unified diff
bugfixxes