aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmllocale.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-05-07 13:17:08 +0200
committerLars Knoll <lars.knoll@digia.com>2013-05-07 13:43:07 +0200
commit41f8a7c0f645e04dba5952c4cdb87828ea2a884b (patch)
tree33a3d50e8032410a8bddf552183942b2a610fd77 /src/qml/qml/qqmllocale.cpp
parent3fe97384fef6fd7d167017cd950313b34a64c9c1 (diff)
Get rid of QV8Engine::qtDateTimeFromJsDate
Change-Id: I6a748ace761661ffe40e8fa73839f974e8a0afac QV4::DateObject has a very convenient toQDateTime() function :) Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmllocale.cpp')
-rw-r--r--src/qml/qml/qqmllocale.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp
index 3dc7f690d1..c71973fac6 100644
--- a/src/qml/qml/qqmllocale.cpp
+++ b/src/qml/qml/qqmllocale.cpp
@@ -176,7 +176,7 @@ QV4::Value QQmlDateExtension::toLocaleString(const v8::Arguments& args)
if (!args.This()->IsDate())
return QV4::Value::undefinedValue();
- QDateTime dt = QV8Engine::qtDateTimeFromJsDate(v8::Handle<v8::Date>::Cast(args.This())->NumberValue());
+ QDateTime dt = args.This()->v4Value().asDateObject()->toQDateTime();
if (args.Length() == 0) {
// Use QLocale for standard toLocaleString() function
@@ -217,7 +217,7 @@ QV4::Value QQmlDateExtension::toLocaleTimeString(const v8::Arguments& args)
if (!args.This()->IsDate())
return QV4::Value::undefinedValue();
- QDateTime dt = QV8Engine::qtDateTimeFromJsDate(v8::Handle<v8::Date>::Cast(args.This())->NumberValue());
+ QDateTime dt = args.This()->v4Value().asDateObject()->toQDateTime();;
QTime time = dt.time();
if (args.Length() == 0) {
@@ -259,7 +259,7 @@ QV4::Value QQmlDateExtension::toLocaleDateString(const v8::Arguments& args)
if (!args.This()->IsDate())
return QV4::Value::undefinedValue();
- QDateTime dt = QV8Engine::qtDateTimeFromJsDate(v8::Handle<v8::Date>::Cast(args.This())->NumberValue());
+ QDateTime dt = args.This()->v4Value().asDateObject()->toQDateTime();;
QDate date = dt.date();
if (args.Length() == 0) {