forked from qt-creator/qt-creator
Add QmlPrototypeReference::document() getter
Enable access to the private Document instance in the same way its done already in the ASTObjectValue class by adding a const getter. Change-Id: I0581e527bb766fc72682f2e38d0d8d52d4452deb Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
committed by
Kai Koehne
parent
9367ad36be
commit
97c955a323
@@ -2076,6 +2076,11 @@ UiQualifiedId *QmlPrototypeReference::qmlTypeName() const
|
|||||||
return m_qmlTypeName;
|
return m_qmlTypeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Document *QmlPrototypeReference::document() const
|
||||||
|
{
|
||||||
|
return m_doc;
|
||||||
|
}
|
||||||
|
|
||||||
const Value *QmlPrototypeReference::value(ReferenceContext *referenceContext) const
|
const Value *QmlPrototypeReference::value(ReferenceContext *referenceContext) const
|
||||||
{
|
{
|
||||||
return referenceContext->context()->lookupType(m_doc, m_qmlTypeName);
|
return referenceContext->context()->lookupType(m_doc, m_qmlTypeName);
|
||||||
|
|||||||
@@ -872,6 +872,7 @@ public:
|
|||||||
const QmlPrototypeReference *asQmlPrototypeReference() const Q_DECL_OVERRIDE;
|
const QmlPrototypeReference *asQmlPrototypeReference() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
AST::UiQualifiedId *qmlTypeName() const;
|
AST::UiQualifiedId *qmlTypeName() const;
|
||||||
|
const Document *document() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Value *value(ReferenceContext *referenceContext) const Q_DECL_OVERRIDE;
|
const Value *value(ReferenceContext *referenceContext) const Q_DECL_OVERRIDE;
|
||||||
|
|||||||
Reference in New Issue
Block a user