summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlmetatype.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-12-02 05:07:54 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-12-02 05:07:54 (GMT)
commitdd0959ed872bf0cda7ad88382abce0c4b20bbdea (patch)
treecd49820f7f1a796818fb03bd66fc08da6193f3ab /src/declarative/qml/qmlmetatype.cpp
parentf3076897a43c1093ec19d4ea71cf4c923eb7a084 (diff)
parent14827a4ae7fd531adc802219473d9822e696b982 (diff)
downloadQt-dd0959ed872bf0cda7ad88382abce0c4b20bbdea.zip
Qt-dd0959ed872bf0cda7ad88382abce0c4b20bbdea.tar.gz
Qt-dd0959ed872bf0cda7ad88382abce0c4b20bbdea.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml/qmlmetatype.cpp')
-rw-r--r--src/declarative/qml/qmlmetatype.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlmetatype.cpp b/src/declarative/qml/qmlmetatype.cpp
index 5fb2f50..46d967b 100644
--- a/src/declarative/qml/qmlmetatype.cpp
+++ b/src/declarative/qml/qmlmetatype.cpp
@@ -58,6 +58,7 @@
#include <qlocale.h>
#include <ctype.h>
#include <QtCore/qcryptographichash.h>
+#include <QtScript/qscriptvalue.h>
#include <private/qmlcustomparser_p.h>
#ifdef QT_BOOTSTRAPPED
@@ -929,6 +930,7 @@ QList<QmlType*> QmlMetaType::qmlTypes()
#include <QtGui/qvector3d.h>
#include <QtGui/qvector4d.h>
#include <QtGui/qquaternion.h>
+Q_DECLARE_METATYPE(QScriptValue);
/*!
Copies \a copy into \a data, assuming they both are of type \a type. If
@@ -1138,6 +1140,9 @@ bool QmlMetaType::copy(int type, void *data, const void *copy)
if (type == qMetaTypeId<QVariant>()) {
*static_cast<NS(QVariant) *>(data) = *static_cast<const NS(QVariant)*>(copy);
return true;
+ } else if (type == qMetaTypeId<QScriptValue>()) {
+ *static_cast<NS(QScriptValue) *>(data) = *static_cast<const NS(QScriptValue)*>(copy);
+ return true;
} else if (typeCategory(type) != Unknown) {
*static_cast<void **>(data) = *static_cast<void* const *>(copy);
return true;
@@ -1340,6 +1345,9 @@ bool QmlMetaType::copy(int type, void *data, const void *copy)
if (type == qMetaTypeId<QVariant>()) {
*static_cast<NS(QVariant) *>(data) = NS(QVariant)();
return true;
+ } else if (type == qMetaTypeId<QScriptValue>()) {
+ *static_cast<NS(QScriptValue) *>(data) = NS(QScriptValue)();
+ return true;
} else if (typeCategory(type) != Unknown) {
*static_cast<void **>(data) = 0;
return true;