Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision da565582

Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt

  • ID da565582698d8e26cfc84ba36a51874c1aaf958d
  • Vorgänger d933d48e
  • Nachfolger 38a2aaf2

small update

Unterschiede anzeigen:

src/entity.cpp
}
InheritanceStrategy Entity::getInheritanceStrategy() const {
return JOINED_TABLE;
return InheritanceStrategy::JOINED_TABLE;
}
bool Entity::isInheritanceCascaded() const {
......
stopAtSingleTableInheritance) const {
QList<const QMetaObject *> classes = QList<const QMetaObject *>();
auto superMetaObject = this->metaObject()->superClass();
if (this->getInheritanceStrategy() == JOINED_TABLE) {
if (this->getInheritanceStrategy() == InheritanceStrategy::JOINED_TABLE) {
Entity *e = nullptr;
while (superMetaObject && QString(superMetaObject->className()) !=
QString("CuteEntityManager::Entity")) {
......
if (e) {
classes.append(superMetaObject);
superMetaObject = superMetaObject->superClass();
quint8 s = e->getInheritanceStrategy();
InheritanceStrategy s = e->getInheritanceStrategy();
delete e;
e = nullptr;
if (stopAtSingleTableInheritance && s == PER_CLASS_TABLE) {
if (stopAtSingleTableInheritance && s == InheritanceStrategy::PER_CLASS_TABLE) {
break;
}
} else {
......
auto superMetaObjectPropertyMap = QHash<QString, QMetaProperty>();
auto superMeta = this->metaObject()->superClass();
if (QString(superMeta->className()) != QString("CuteEntityManager::Entity")
&& this->getInheritanceStrategy() == JOINED_TABLE) {
&& this->getInheritanceStrategy() == InheritanceStrategy::JOINED_TABLE) {
for (int var = 0; var < superMeta->propertyCount(); ++var) {
QMetaProperty prop = superMeta->property(var);
if (prop.isReadable() && prop.isWritable()) {

Auch abrufbar als: Unified diff