aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4sequenceobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index 83fd2efa60..046f7f62b1 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -375,8 +375,8 @@ public:
}
QV4::Scope scope(ctx);
- if (ctx->d()->callData->argc == 1 && ctx->d()->callData->args[0].asFunctionObject()) {
- CompareFunctor cf(ctx, ctx->d()->callData->args[0]);
+ if (ctx->argc() == 1 && ctx->args()[0].asFunctionObject()) {
+ CompareFunctor cf(ctx, ctx->args()[0]);
std::sort(d()->container.begin(), d()->container.end(), cf);
} else {
DefaultCompareFunctor cf;
@@ -390,7 +390,7 @@ public:
static QV4::ReturnedValue method_get_length(QV4::CallContext *ctx)
{
QV4::Scope scope(ctx);
- QV4::Scoped<QQmlSequence<Container> > This(scope, ctx->d()->callData->thisObject.as<QQmlSequence<Container> >());
+ QV4::Scoped<QQmlSequence<Container> > This(scope, ctx->thisObject().as<QQmlSequence<Container> >());
if (!This)
return ctx->engine()->throwTypeError();
@@ -405,11 +405,11 @@ public:
static QV4::ReturnedValue method_set_length(QV4::CallContext* ctx)
{
QV4::Scope scope(ctx);
- QV4::Scoped<QQmlSequence<Container> > This(scope, ctx->d()->callData->thisObject.as<QQmlSequence<Container> >());
+ QV4::Scoped<QQmlSequence<Container> > This(scope, ctx->thisObject().as<QQmlSequence<Container> >());
if (!This)
return ctx->engine()->throwTypeError();
- quint32 newLength = ctx->d()->callData->args[0].toUInt32();
+ quint32 newLength = ctx->args()[0].toUInt32();
/* Qt containers have int (rather than uint) allowable indexes. */
if (newLength > INT_MAX) {
generateWarning(scope.engine, QLatin1String("Index out of range during length set"));
@@ -558,11 +558,11 @@ void SequencePrototype::init()
QV4::ReturnedValue SequencePrototype::method_sort(QV4::CallContext *ctx)
{
QV4::Scope scope(ctx);
- QV4::ScopedObject o(scope, ctx->d()->callData->thisObject);
+ QV4::ScopedObject o(scope, ctx->thisObject());
if (!o || !o->isListType())
return ctx->engine()->throwTypeError();
- if (ctx->d()->callData->argc >= 2)
+ if (ctx->argc() >= 2)
return o.asReturnedValue();
#define CALL_SORT(SequenceElementType, SequenceElementTypeName, SequenceType, DefaultValue) \