summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Sauer <sebastian.sauer@kdab.com>2014-10-13 18:12:06 +0700
committerKai Koehne <kai.koehne@theqtcompany.com>2014-10-15 11:16:18 +0200
commit97c955a323c243c503f7076e492abe6f35b746a3 (patch)
tree6fb1d1a62d07ac06f09c36888ddc34bb2a767509 /src
parent9367ad36bec234e9b094e2c503412188538f02e2 (diff)
downloadqt-creator-97c955a323c243c503f7076e492abe6f35b746a3.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp5
-rw-r--r--src/libs/qmljs/qmljsinterpreter.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 5f9a02573b..967e6788aa 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 cb44f9ed6b..8bcb9f07ab 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;