summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlmetatype.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-12-02 05:47:29 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-12-02 05:47:29 (GMT)
commitd9735849834a5efc638dd026d6fe51d15dc528ee (patch)
tree3313bf43000feffb4cffe4e1f119fda45c60877f /src/declarative/qml/qmlmetatype.cpp
parent289645d2bf46c1d6eace7a0d60389a9c10dd0c34 (diff)
parentdd0959ed872bf0cda7ad88382abce0c4b20bbdea (diff)
downloadQt-d9735849834a5efc638dd026d6fe51d15dc528ee.zip
Qt-d9735849834a5efc638dd026d6fe51d15dc528ee.tar.gz
Qt-d9735849834a5efc638dd026d6fe51d15dc528ee.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/qml/qmlmetatype.cpp
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 5172152..06927457 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 "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;