prop->value->metatype = type->attachedPropertiesType();
} else {
// Setup regular property data
- if (prop->isDefault) {
- QMetaProperty p = QDeclarativeMetaType::defaultProperty(metaObject);
-
- if (p.name())
- prop->setName(p.name());
- }
-
bool notInRevision = false;
QDeclarativePropertyCache::Data *d =
prop->name().isEmpty()?0:property(obj, prop->name(), ¬InRevision);
} else if (d) {
prop->index = d->coreIndex;
prop->core = *d;
+ } else if (prop->isDefault) {
+ QMetaProperty p = QDeclarativeMetaType::defaultProperty(metaObject);
+ QDeclarativePropertyCache::Data defaultPropertyData;
+ defaultPropertyData.load(p, engine);
+ if (p.name())
+ prop->setName(p.name());
+ prop->core = defaultPropertyData;
+ prop->index = prop->core.coreIndex;
}
// We can't error here as the "id" property does not require a