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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user