summaryrefslogtreecommitdiffstats
path: root/src/script/qscriptvalue.cpp
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-05 14:48:52 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-06-05 14:56:53 (GMT)
commit9691523b796c6acc6a837a5f5a34fef16aa74c48 (patch)
tree355174d4b7fa66aeac721caa01d98ca3616768cf /src/script/qscriptvalue.cpp
parentff9497f82d605688453e2f027bab7c719048f0d2 (diff)
downloadQt-9691523b796c6acc6a837a5f5a34fef16aa74c48.zip
Qt-9691523b796c6acc6a837a5f5a34fef16aa74c48.tar.gz
Qt-9691523b796c6acc6a837a5f5a34fef16aa74c48.tar.bz2
have QScriptValue::toVariant() convert Array objects to QVariantLists
Converting the array to its string representation is not very useful. Now round-trip conversion will work as well. Reviewed-by: Ariya Hidayat
Diffstat (limited to 'src/script/qscriptvalue.cpp')
-rw-r--r--src/script/qscriptvalue.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/qscriptvalue.cpp b/src/script/qscriptvalue.cpp
index a253985..f72d1db 100644
--- a/src/script/qscriptvalue.cpp
+++ b/src/script/qscriptvalue.cpp
@@ -904,6 +904,7 @@ qsreal QScriptValue::toInteger() const
\row \o QObject Object \o A QVariant containing a pointer to the QObject.
\row \o Date Object \o A QVariant containing the date value (toDateTime()).
\row \o RegExp Object \o A QVariant containing the regular expression value (toRegExp()).
+ \row \o Array Object \o The array is converted to a QVariantList.
\row \o Object \o If the value is primitive, then the result is converted to a QVariant according to the above rules; otherwise, an invalid QVariant is returned.
\endtable