diff options
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4dateobject.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp index aee4917842..b732c8a04a 100644 --- a/src/qml/jsruntime/qv4dateobject.cpp +++ b/src/qml/jsruntime/qv4dateobject.cpp @@ -779,14 +779,14 @@ double DatePrototype::getThisDate(ExecutionContext *ctx) } } -ReturnedValue DatePrototype::method_parse(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_parse(CallContext *ctx) { if (!ctx->callData->argc) return Encode(qSNaN()); return Encode(ParseString(ctx->callData->args[0].toString(ctx)->toQString())); } -ReturnedValue DatePrototype::method_UTC(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_UTC(CallContext *ctx) { const int numArgs = ctx->callData->argc; if (numArgs >= 2) { @@ -806,62 +806,62 @@ ReturnedValue DatePrototype::method_UTC(SimpleCallContext *ctx) return Encode::undefined(); } -ReturnedValue DatePrototype::method_now(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_now(CallContext *ctx) { Q_UNUSED(ctx); double t = currentTime(); return Encode(t); } -ReturnedValue DatePrototype::method_toString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toString(CallContext *ctx) { double t = getThisDate(ctx); return ctx->engine->newString(ToString(t))->asReturnedValue(); } -ReturnedValue DatePrototype::method_toDateString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toDateString(CallContext *ctx) { double t = getThisDate(ctx); return ctx->engine->newString(ToDateString(t))->asReturnedValue(); } -ReturnedValue DatePrototype::method_toTimeString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toTimeString(CallContext *ctx) { double t = getThisDate(ctx); return ctx->engine->newString(ToTimeString(t))->asReturnedValue(); } -ReturnedValue DatePrototype::method_toLocaleString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toLocaleString(CallContext *ctx) { double t = getThisDate(ctx); return ctx->engine->newString(ToLocaleString(t))->asReturnedValue(); } -ReturnedValue DatePrototype::method_toLocaleDateString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toLocaleDateString(CallContext *ctx) { double t = getThisDate(ctx); return ctx->engine->newString(ToLocaleDateString(t))->asReturnedValue(); } -ReturnedValue DatePrototype::method_toLocaleTimeString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toLocaleTimeString(CallContext *ctx) { double t = getThisDate(ctx); return ctx->engine->newString(ToLocaleTimeString(t))->asReturnedValue(); } -ReturnedValue DatePrototype::method_valueOf(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_valueOf(CallContext *ctx) { double t = getThisDate(ctx); return Encode(t); } -ReturnedValue DatePrototype::method_getTime(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getTime(CallContext *ctx) { double t = getThisDate(ctx); return Encode(t); } -ReturnedValue DatePrototype::method_getYear(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getYear(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -869,7 +869,7 @@ ReturnedValue DatePrototype::method_getYear(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getFullYear(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getFullYear(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -877,7 +877,7 @@ ReturnedValue DatePrototype::method_getFullYear(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCFullYear(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCFullYear(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -885,7 +885,7 @@ ReturnedValue DatePrototype::method_getUTCFullYear(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getMonth(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getMonth(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -893,7 +893,7 @@ ReturnedValue DatePrototype::method_getMonth(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCMonth(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCMonth(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -901,7 +901,7 @@ ReturnedValue DatePrototype::method_getUTCMonth(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getDate(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getDate(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -909,7 +909,7 @@ ReturnedValue DatePrototype::method_getDate(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCDate(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCDate(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -917,7 +917,7 @@ ReturnedValue DatePrototype::method_getUTCDate(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getDay(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getDay(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -925,7 +925,7 @@ ReturnedValue DatePrototype::method_getDay(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCDay(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCDay(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -933,7 +933,7 @@ ReturnedValue DatePrototype::method_getUTCDay(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getHours(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getHours(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -941,7 +941,7 @@ ReturnedValue DatePrototype::method_getHours(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCHours(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCHours(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -949,7 +949,7 @@ ReturnedValue DatePrototype::method_getUTCHours(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getMinutes(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getMinutes(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -957,7 +957,7 @@ ReturnedValue DatePrototype::method_getMinutes(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCMinutes(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCMinutes(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -965,7 +965,7 @@ ReturnedValue DatePrototype::method_getUTCMinutes(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getSeconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getSeconds(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -973,7 +973,7 @@ ReturnedValue DatePrototype::method_getSeconds(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCSeconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCSeconds(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -981,7 +981,7 @@ ReturnedValue DatePrototype::method_getUTCSeconds(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getMilliseconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getMilliseconds(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -989,7 +989,7 @@ ReturnedValue DatePrototype::method_getMilliseconds(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getUTCMilliseconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getUTCMilliseconds(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -997,7 +997,7 @@ ReturnedValue DatePrototype::method_getUTCMilliseconds(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_getTimezoneOffset(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_getTimezoneOffset(CallContext *ctx) { double t = getThisDate(ctx); if (! std::isnan(t)) @@ -1005,7 +1005,7 @@ ReturnedValue DatePrototype::method_getTimezoneOffset(SimpleCallContext *ctx) return Encode(t); } -ReturnedValue DatePrototype::method_setTime(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setTime(CallContext *ctx) { Scope scope(ctx); Scoped<DateObject> self(scope, ctx->callData->thisObject); @@ -1017,7 +1017,7 @@ ReturnedValue DatePrototype::method_setTime(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setMilliseconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setMilliseconds(CallContext *ctx) { Scope scope(ctx); Scoped<DateObject> self(scope, ctx->callData->thisObject); @@ -1030,7 +1030,7 @@ ReturnedValue DatePrototype::method_setMilliseconds(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCMilliseconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCMilliseconds(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1042,7 +1042,7 @@ ReturnedValue DatePrototype::method_setUTCMilliseconds(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setSeconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setSeconds(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1056,7 +1056,7 @@ ReturnedValue DatePrototype::method_setSeconds(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCSeconds(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCSeconds(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1070,7 +1070,7 @@ ReturnedValue DatePrototype::method_setUTCSeconds(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setMinutes(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setMinutes(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1085,7 +1085,7 @@ ReturnedValue DatePrototype::method_setMinutes(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCMinutes(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCMinutes(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1100,7 +1100,7 @@ ReturnedValue DatePrototype::method_setUTCMinutes(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setHours(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setHours(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1116,7 +1116,7 @@ ReturnedValue DatePrototype::method_setHours(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCHours(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCHours(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1132,7 +1132,7 @@ ReturnedValue DatePrototype::method_setUTCHours(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setDate(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setDate(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1145,7 +1145,7 @@ ReturnedValue DatePrototype::method_setDate(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCDate(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCDate(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1158,7 +1158,7 @@ ReturnedValue DatePrototype::method_setUTCDate(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setMonth(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setMonth(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1172,7 +1172,7 @@ ReturnedValue DatePrototype::method_setMonth(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCMonth(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCMonth(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1186,7 +1186,7 @@ ReturnedValue DatePrototype::method_setUTCMonth(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setYear(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setYear(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1212,7 +1212,7 @@ ReturnedValue DatePrototype::method_setYear(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setUTCFullYear(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setUTCFullYear(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1227,7 +1227,7 @@ ReturnedValue DatePrototype::method_setUTCFullYear(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_setFullYear(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_setFullYear(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1244,7 +1244,7 @@ ReturnedValue DatePrototype::method_setFullYear(SimpleCallContext *ctx) return self->value.asReturnedValue(); } -ReturnedValue DatePrototype::method_toUTCString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toUTCString(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1267,7 +1267,7 @@ static void addZeroPrefixedInt(QString &str, int num, int nDigits) } } -ReturnedValue DatePrototype::method_toISOString(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toISOString(CallContext *ctx) { DateObject *self = ctx->callData->thisObject.asDateObject(); if (!self) @@ -1305,7 +1305,7 @@ ReturnedValue DatePrototype::method_toISOString(SimpleCallContext *ctx) return ctx->engine->newString(result)->asReturnedValue(); } -ReturnedValue DatePrototype::method_toJSON(SimpleCallContext *ctx) +ReturnedValue DatePrototype::method_toJSON(CallContext *ctx) { Scope scope(ctx); ScopedValue O(scope, __qmljs_to_object(ctx, ValueRef(&ctx->callData->thisObject))); |