- if (prop->isDefault) {
- QMetaProperty p = QDeclarativeMetaType::defaultProperty(metaObject);
-
- if (p.name()) {
- prop->setName(QString::fromLatin1(p.name()));
-
- QDeclarativePropertyCache::Data *d = property(obj, p.propertyIndex());
- prop->index = d->coreIndex;
- prop->core = *d;
- }
-
- } else {
- bool notInRevision = false;
- QDeclarativePropertyCache::Data *d = property(obj, prop->name(), ¬InRevision);
-
- if (d == 0 && notInRevision) {
- const QList<QDeclarativeTypeData::TypeReference> &resolvedTypes = unit->resolvedTypes();
- const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type);
- if (type.type) {
- COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(elementName(obj)).arg(prop->name().toString()).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion));
- } else {
- COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available due to component versioning.").arg(elementName(obj)).arg(prop->name().toString()));
- }
- } else if (d) {
- prop->index = d->coreIndex;
- prop->core = *d;
+ if (d == 0 && notInRevision) {
+ const QList<QDeclarativeTypeData::TypeReference> &resolvedTypes = unit->resolvedTypes();
+ const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type);
+ if (type.type) {
+ COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(elementName(obj)).arg(prop->name().toString()).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion));
+ } else {
+ COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available due to component versioning.").arg(elementName(obj)).arg(prop->name().toString()));