aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-21 11:26:22 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-15 07:37:06 +0000
commitb5902bd43a3b45a25e3b960b20c3c1ecb41073fe (patch)
tree377a559690415a0f4efd0cc81a219e52aca411f7 /src/qml/jsruntime/qv4engine.cpp
parent5dac83eb2148e4e574b85eaaf1573dee088b2308 (diff)
Get rid of the qmlContextObject method
Change-Id: Id8c0d9e15dd85b3818e283ab6769a49bb2e6d0f7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index caf07e8b0b..26991351d1 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -745,18 +745,13 @@ Heap::QmlContext *ExecutionEngine::qmlContext() const
return static_cast<Heap::QmlContext *>(ctx);
}
-Heap::QmlContextWrapper *ExecutionEngine::qmlContextObject() const
+QObject *ExecutionEngine::qmlScopeObject() const
{
Heap::QmlContext *ctx = qmlContext();
if (!ctx)
return 0;
- Q_ASSERT(ctx->qml);
- return ctx->qml;
-}
-QObject *ExecutionEngine::qmlScopeObject() const
-{
- return qmlContextObject()->scopeObject;
+ return ctx->qml->scopeObject;
}
ReturnedValue ExecutionEngine::qmlSingletonWrapper(String *name)
@@ -782,9 +777,11 @@ ReturnedValue ExecutionEngine::qmlSingletonWrapper(String *name)
QQmlContextData *ExecutionEngine::callingQmlContext() const
{
- Heap::QmlContextWrapper *w = qmlContextObject();
+ Heap::QmlContext *ctx = qmlContext();
+ if (!ctx)
+ return 0;
- return w ? w->context.contextData() : 0;
+ return ctx->qml->context.contextData();
}
QVector<StackFrame> ExecutionEngine::stackTrace(int frameLimit) const