Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 47d95679

Von Christian Ehringfeld vor mehr als 6 Jahren hinzugefügt

bugfix

Unterschiede anzeigen:

src/entity.h
#define EM_MACRO(type) \
virtual void setListProperty(const QSharedPointer<Entity> &e,QList<QSharedPointer<Entity>> &entList, const QMetaProperty &property) override { \
QList<QSharedPointer<type>> list = *reinterpret_cast<QList<QSharedPointer<type>>*>(&entList); \
QVariant var; \
var.setValue<QList<QSharedPointer<type>>>(list); \
property.write(e.data(), var); \
} \
virtual void setProperty(const QSharedPointer<Entity> &e,QSharedPointer<Entity> &value, const QMetaProperty &property) override { \
QSharedPointer<type> en = *reinterpret_cast<QSharedPointer<type>*>(&value); \
QVariant var; \
var.setValue<QSharedPointer<type>>(en); \
property.write(e.data(), var); \
property.write(e.data(), QVariant::fromValue(list)); \
}
public:
......
void setErrors(const QList<ErrorMsg> &value);
virtual void setListProperty(const QSharedPointer<Entity> &e, QList<QSharedPointer<Entity>> &entList,
const QMetaProperty &property) = 0;
virtual void setProperty(const QSharedPointer<Entity> &e, QSharedPointer<Entity> &value, const QMetaProperty &property) = 0;
virtual void setProperty(const QSharedPointer<Entity> &e, QSharedPointer<Entity> value, const QMetaProperty &property);
QString internalRelationName(const QString &name);
protected:
explicit Entity (QObject *parent = 0);

Auch abrufbar als: Unified diff