diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-25 13:52:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:32 +0200 |
commit | 4d40fa24c3ee8def2f27bd237fc8dec25cf3f473 (patch) | |
tree | cb4ad758f03cf204cbae1e7d086bfeaf73a64bc3 /src/qml/jsruntime/qv4dateobject.cpp | |
parent | abd82c68d564c97a4452a3afa2d63320e7292b30 (diff) |
Move Value::toInteger(double) and related to Primitive
Also clean up a few other direct uses of Value
Change-Id: Ie27d42c1b31b9e6d16d0a60071cb5e4e1c5b9e8b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4dateobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp index 2ecd80c58d..d18f3eb681 100644 --- a/src/qml/jsruntime/qv4dateobject.cpp +++ b/src/qml/jsruntime/qv4dateobject.cpp @@ -212,7 +212,7 @@ static inline double MonthFromTime(double t) static inline double DateFromTime(double t) { - int m = (int) Value::toInteger(MonthFromTime(t)); + int m = (int) Primitive::toInteger(MonthFromTime(t)); double d = DayWithinYear(t); double l = InLeapYear(t); @@ -336,7 +336,7 @@ static inline double TimeClip(double t) { if (! qIsFinite(t) || fabs(t) > 8.64e15) return qSNaN(); - return Value::toInteger(t); + return Primitive::toInteger(t); } static inline double ParseString(const QString &s) @@ -1193,7 +1193,7 @@ ReturnedValue DatePrototype::method_setYear(SimpleCallContext *ctx) if (std::isnan(year)) { r = qSNaN(); } else { - if ((Value::toInteger(year) >= 0) && (Value::toInteger(year) <= 99)) + if ((Primitive::toInteger(year) >= 0) && (Primitive::toInteger(year) <= 99)) year += 1900; r = MakeDay(year, MonthFromTime(t), DateFromTime(t)); r = UTC(MakeDate(r, TimeWithinDay(t))); |