aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/cppintegration/data.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/src/cppintegration/data.qdoc')
-rw-r--r--src/qml/doc/src/cppintegration/data.qdoc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/doc/src/cppintegration/data.qdoc b/src/qml/doc/src/cppintegration/data.qdoc
index 9b2771c18e..8a606d672a 100644
--- a/src/qml/doc/src/cppintegration/data.qdoc
+++ b/src/qml/doc/src/cppintegration/data.qdoc
@@ -247,18 +247,18 @@ Similarly, if a C++ type uses a QDateTime for a property type or method
parameter, the value can be created as a JavaScript \c Date object in QML, and
is automatically converted to a QDateTime value when it is passed to C++.
-
-\section2 QTime to JavaScript Date
+//! Target adds an anchor, so renaming the section won't break incoming links.
+\target QTime to JavaScript Date
+\section2 QTime and JavaScript Date
The QML engine provides automatic type conversion from QTime values to
-JavaScript \c Date objects. The date component of the resulting Date
-object should not be relied upon, as it is operating system dependent.
-Specifically, the year (and month and day) are set to zero. Conversion
-from a JavaScript \c Date object to QTime is done by converting to a
-QDateTime, and then relying on QVariant to convert it to a QTime. The end
-effect is that the date part of the \c Date object is ignored, but the
-local timezone will be used ignoring any DST complications it may have.
+JavaScript \c Date objects. As QTime values do not contain a date component,
+one is created for the conversion only. Thus, you should not rely on the date
+component of the resulting Date object.
+Under the hood, conversion from a JavaScript \c Date object to QTime is done by
+converting to a QDateTime object and calling its \l {QDateTime::}{time()}
+method.
\section2 Sequence Type to JavaScript Array