From 97c955a323c243c503f7076e492abe6f35b746a3 Mon Sep 17 00:00:00 2001 From: Sebastian Sauer Date: Mon, 13 Oct 2014 18:12:06 +0700 Subject: [PATCH] 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 Reviewed-by: Fawzi Mohamed --- src/libs/qmljs/qmljsinterpreter.cpp | 5 +++++ src/libs/qmljs/qmljsinterpreter.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 5f9a02573b9..967e6788aae 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -2076,6 +2076,11 @@ UiQualifiedId *QmlPrototypeReference::qmlTypeName() const return m_qmlTypeName; } +const Document *QmlPrototypeReference::document() const +{ + return m_doc; +} + const Value *QmlPrototypeReference::value(ReferenceContext *referenceContext) const { return referenceContext->context()->lookupType(m_doc, m_qmlTypeName); diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index cb44f9ed6b7..8bcb9f07abc 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -872,6 +872,7 @@ public: const QmlPrototypeReference *asQmlPrototypeReference() const Q_DECL_OVERRIDE; AST::UiQualifiedId *qmlTypeName() const; + const Document *document() const; private: const Value *value(ReferenceContext *referenceContext) const Q_DECL_OVERRIDE;