summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 1deadb2..96145fb 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1365,7 +1365,9 @@ QScriptValue QDeclarativeEnginePrivate::scriptValueFromVariant(const QVariant &v
rv.setProperty(ii, objectClass->newQObject(object));
}
return rv;
- }
+ } else if (QDeclarativeValueType *vt = valueTypes[val.userType()]) {
+ return valueTypeClass->newObject(val, vt);
+ }
bool objOk;
QObject *obj = QDeclarativeMetaType::toQObject(val, &objOk);