diff options
author | Lars Knoll <[email protected]> | 2013-11-21 16:41:32 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-12-04 09:45:50 +0100 |
commit | 9306c05dd152511b8b938d7899a7bdf1aeb8d1c2 (patch) | |
tree | 514b6cda632244d7f9e7fdb1af143da05b7b1ce0 /src/quick | |
parent | 0f32303e5cc9c539aa8698cab2b8cc2e946d885a (diff) |
Encapsulate the current context and fix it's usage
Encapsulate accesses to the current context, and rework
the way we push and pop this context from the context
stack.
Largely a cleanup, but simplifies the code in the long term
Change-Id: I409e378490d0ab027be6a4c01a4031b2ea35c51d
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 2bc9df35d4..b6eb2db33d 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -3165,7 +3165,7 @@ QV4::ReturnedValue QQuickJSContext2DPixelData::getIndexed(QV4::Managed *m, uint QV4::Scope scope(v4); QV4::Scoped<QQuickJSContext2DPixelData> r(scope, m->as<QQuickJSContext2DPixelData>()); if (!m) - return m->engine()->current->throwTypeError(); + return m->engine()->currentContext()->throwTypeError(); if (r && index < static_cast<quint32>(r->image.width() * r->image.height() * 4)) { if (hasProperty) @@ -3200,7 +3200,7 @@ void QQuickJSContext2DPixelData::putIndexed(QV4::Managed *m, uint index, const Q QV4::Scoped<QQuickJSContext2DPixelData> r(scope, m->as<QQuickJSContext2DPixelData>()); if (!r) { - v4->current->throwTypeError(); + v4->currentContext()->throwTypeError(); return; } |