summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/qt/api/qscriptvalue.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-30 15:42:16 +0100
committerSteve Block <steveblock@google.com>2010-10-07 10:59:29 +0100
commitbec39347bb3bb5bf1187ccaf471d26247f28b585 (patch)
tree56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /JavaScriptCore/qt/api/qscriptvalue.cpp
parent90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff)
downloadexternal_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'JavaScriptCore/qt/api/qscriptvalue.cpp')
-rw-r--r--JavaScriptCore/qt/api/qscriptvalue.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/JavaScriptCore/qt/api/qscriptvalue.cpp b/JavaScriptCore/qt/api/qscriptvalue.cpp
index a7d0b7b..8a7a6c4 100644
--- a/JavaScriptCore/qt/api/qscriptvalue.cpp
+++ b/JavaScriptCore/qt/api/qscriptvalue.cpp
@@ -324,6 +324,17 @@ bool QScriptValue::isArray() const
}
/*!
+ Returns true if this QScriptValue is an object of the Date class;
+ otherwise returns false.
+
+ \sa QScriptEngine::newDate()
+*/
+bool QScriptValue::isDate() const
+{
+ return d_ptr->isDate();
+}
+
+/*!
Returns true if this QScriptValue is of the Object type; otherwise
returns false.
@@ -488,6 +499,18 @@ QScriptValue QScriptValue::toObject() const
}
/*!
+ Returns a QDateTime representation of this value, in local time.
+ If this QScriptValue is not a date, or the value of the date is
+ NaN (Not-a-Number), an invalid QDateTime is returned.
+
+ \sa isDate()
+*/
+QDateTime QScriptValue::toDateTime() const
+{
+ return d_ptr->toDateTime();
+}
+
+/*!
Calls this QScriptValue as a function, using \a thisObject as
the `this' object in the function call, and passing \a args
as arguments to the function. Returns the value returned from