aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-06 12:44:12 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-11 13:01:57 +0200
commitf9fda643ab7aa1a66e4816382f0e66499818f42a (patch)
tree10d537491f648945632ac7181557c157c891e002 /src/qml/jsruntime/qv4dateobject.cpp
parenta23158a41291055aa0f546869e4c9f8efb19c2dc (diff)
Change signature of call/construct() to take a pointer to a CallData
Change-Id: I5467aadba083e4b01fb0a7170946695207033680 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4dateobject.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp
index c76fbed3bf..5d9abfe74e 100644
--- a/src/qml/jsruntime/qv4dateobject.cpp
+++ b/src/qml/jsruntime/qv4dateobject.cpp
@@ -654,15 +654,15 @@ DateCtor::DateCtor(ExecutionContext *scope)
vtbl = &static_vtbl;
}
-Value DateCtor::construct(Managed *m, const CallData &d)
+Value DateCtor::construct(Managed *m, CallData *callData)
{
double t = 0;
- if (d.argc == 0)
+ if (callData->argc == 0)
t = currentTime();
- else if (d.argc == 1) {
- Value arg = d.args[0];
+ else if (callData->argc == 1) {
+ Value arg = callData->args[0];
if (DateObject *d = arg.asDateObject())
arg = d->value;
else
@@ -675,13 +675,13 @@ Value DateCtor::construct(Managed *m, const CallData &d)
}
else { // d.argc > 1
- double year = d.args[0].toNumber();
- double month = d.args[1].toNumber();
- double day = d.argc >= 3 ? d.args[2].toNumber() : 1;
- double hours = d.argc >= 4 ? d.args[3].toNumber() : 0;
- double mins = d.argc >= 5 ? d.args[4].toNumber() : 0;
- double secs = d.argc >= 6 ? d.args[5].toNumber() : 0;
- double ms = d.argc >= 7 ? d.args[6].toNumber() : 0;
+ double year = callData->args[0].toNumber();
+ double month = callData->args[1].toNumber();
+ double day = callData->argc >= 3 ? callData->args[2].toNumber() : 1;
+ double hours = callData->argc >= 4 ? callData->args[3].toNumber() : 0;
+ double mins = callData->argc >= 5 ? callData->args[4].toNumber() : 0;
+ double secs = callData->argc >= 6 ? callData->args[5].toNumber() : 0;
+ double ms = callData->argc >= 7 ? callData->args[6].toNumber() : 0;
if (year >= 0 && year <= 99)
year += 1900;
t = MakeDate(MakeDay(year, month, day), MakeTime(hours, mins, secs, ms));
@@ -692,7 +692,7 @@ Value DateCtor::construct(Managed *m, const CallData &d)
return Value::fromObject(o);
}
-Value DateCtor::call(Managed *m, const CallData &)
+Value DateCtor::call(Managed *m, CallData *)
{
double t = currentTime();
return Value::fromString(m->engine()->current, ToString(t));