forked from qt-creator/qt-creator
QmlJS: Fixed attached objects.
Task-number: QTCREATORBUG-6450 Change-Id: Idd8e2ec3550190a137dbf0fe452c8488fb3fe1ad Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
@@ -164,7 +164,6 @@ QmlObjectValue::QmlObjectValue(FakeMetaObject::ConstPtr metaObject, const QStrin
|
||||
const ComponentVersion &importVersion, int metaObjectRevision,
|
||||
ValueOwner *valueOwner)
|
||||
: ObjectValue(valueOwner),
|
||||
_attachedType(0),
|
||||
_metaObject(metaObject),
|
||||
_moduleName(packageName),
|
||||
_componentVersion(componentVersion),
|
||||
@@ -258,8 +257,13 @@ void QmlObjectValue::processMembers(MemberProcessor *processor) const
|
||||
}
|
||||
}
|
||||
|
||||
if (_attachedType)
|
||||
_attachedType->processMembers(processor);
|
||||
// look into attached types
|
||||
const QString &attachedTypeName = _metaObject->attachedTypeName();
|
||||
if (!attachedTypeName.isEmpty()) {
|
||||
const QmlObjectValue *attachedType = valueOwner()->cppQmlTypes().objectByCppName(attachedTypeName);
|
||||
if (attachedType)
|
||||
attachedType->processMembers(processor);
|
||||
}
|
||||
|
||||
ObjectValue::processMembers(processor);
|
||||
}
|
||||
@@ -354,16 +358,6 @@ QList<const QmlObjectValue *> QmlObjectValue::prototypes() const
|
||||
return protos;
|
||||
}
|
||||
|
||||
const QmlObjectValue *QmlObjectValue::attachedType() const
|
||||
{
|
||||
return _attachedType;
|
||||
}
|
||||
|
||||
void QmlObjectValue::setAttachedType(QmlObjectValue *value)
|
||||
{
|
||||
_attachedType = value;
|
||||
}
|
||||
|
||||
FakeMetaObject::ConstPtr QmlObjectValue::metaObject() const
|
||||
{
|
||||
return _metaObject;
|
||||
|
||||
@@ -430,9 +430,6 @@ public:
|
||||
const QmlObjectValue *prototype() const;
|
||||
QList<const QmlObjectValue *> prototypes() const;
|
||||
|
||||
const QmlObjectValue *attachedType() const;
|
||||
void setAttachedType(QmlObjectValue *value);
|
||||
|
||||
LanguageUtils::FakeMetaObject::ConstPtr metaObject() const;
|
||||
|
||||
QString moduleName() const;
|
||||
@@ -453,7 +450,6 @@ protected:
|
||||
bool isDerivedFrom(LanguageUtils::FakeMetaObject::ConstPtr base) const;
|
||||
|
||||
private:
|
||||
QmlObjectValue *_attachedType;
|
||||
LanguageUtils::FakeMetaObject::ConstPtr _metaObject;
|
||||
const QString _moduleName;
|
||||
// _componentVersion is the version of the export
|
||||
|
||||
Reference in New Issue
Block a user