aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-11-28 01:19:11 -0800
committerOleg Shparber <trollixx@gmail.com>2014-12-12 03:50:28 +0100
commitf43928f6023f435dfe3e600dd4474cd2c7a92e16 (patch)
tree34fe7300d47158e655058f7ae09bbc05d81441f7
parent87a055bc8eee653a18d51f94a546cd452732223a (diff)
Add default parameter value for ScopedCallData()
Change-Id: I16b6662a47c682e145d3e2201f9e90f58405a599 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4object.cpp2
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp2
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h2
-rw-r--r--src/qml/jsruntime/qv4script.cpp2
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index 811d2f0acb..6455219881 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -1311,7 +1311,7 @@ ReturnedValue DatePrototype::method_toJSON(CallContext *ctx)
if (!toIso)
return ctx->engine()->throwTypeError();
- ScopedCallData callData(scope, 0);
+ ScopedCallData callData(scope);
callData->thisObject = ctx->d()->callData->thisObject;
return toIso->call(callData);
}
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 42e0f5389d..db2f236f3b 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -169,7 +169,7 @@ ReturnedValue FunctionObject::name()
ReturnedValue FunctionObject::newInstance()
{
Scope scope(internalClass()->engine);
- ScopedCallData callData(scope, 0);
+ ScopedCallData callData(scope);
return construct(callData);
}
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 70152274e4..7ec0c8208c 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -89,7 +89,7 @@ ReturnedValue Object::getValue(const ValueRef thisObject, const Property *p, Pro
return Encode::undefined();
Scope scope(getter->engine());
- ScopedCallData callData(scope, 0);
+ ScopedCallData callData(scope);
callData->thisObject = *thisObject;
return getter->call(callData);
}
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 090bc32c93..a4e6b5f49b 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -408,7 +408,7 @@ ReturnedValue ObjectPrototype::method_toLocaleString(CallContext *ctx)
Scoped<FunctionObject> f(scope, o->get(ctx->d()->engine->id_toString));
if (!f)
return ctx->engine()->throwTypeError();
- ScopedCallData callData(scope, 0);
+ ScopedCallData callData(scope);
callData->thisObject = o;
return f->call(callData);
}
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index f9a21d706a..1276ca3370 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -362,7 +362,7 @@ struct Scoped
};
struct ScopedCallData {
- ScopedCallData(Scope &scope, int argc)
+ ScopedCallData(Scope &scope, int argc = 0)
{
int size = qMax(argc, (int)QV4::Global::ReservedArgumentCount) + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value);
ptr = reinterpret_cast<CallData *>(scope.engine->stackPush(size));
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp
index 3c68cdd433..34daafefdf 100644
--- a/src/qml/jsruntime/qv4script.cpp
+++ b/src/qml/jsruntime/qv4script.cpp
@@ -306,7 +306,7 @@ ReturnedValue Script::run()
} else {
ScopedObject qmlObj(valueScope, qml.value());
ScopedFunctionObject f(valueScope, engine->memoryManager->alloc<QmlBindingWrapper>(scope, vmFunction, qmlObj));
- ScopedCallData callData(valueScope, 0);
+ ScopedCallData callData(valueScope);
callData->thisObject = Primitive::undefinedValue();
return f->call(callData);
}
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index dad90b77f2..42b10ddc1a 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -110,7 +110,7 @@ QV4::ReturnedValue QQmlJavaScriptExpression::evaluate(QQmlContextData *context,
{
QV4::ExecutionEngine *v4 = QV8Engine::getV4(context->engine);
QV4::Scope scope(v4);
- QV4::ScopedCallData callData(scope, 0);
+ QV4::ScopedCallData callData(scope);
return evaluate(context, function, callData, isUndefined);
}
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index 4b26778008..a19376db68 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -1568,7 +1568,7 @@ void QQmlXMLHttpRequest::dispatchCallbackImpl(const ValueRef me)
QQmlContextData *callingContext = QmlContextWrapper::getContext(activationObject);
if (callingContext) {
- QV4::ScopedCallData callData(scope, 0);
+ QV4::ScopedCallData callData(scope);
callData->thisObject = activationObject.asReturnedValue();
callback->call(callData);
}