aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index f937ee2ca5..a8db3e95a4 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -2195,7 +2195,11 @@ bool CallArgument::fromValue(QMetaType metaType, ExecutionEngine *engine, const
qvariantPtr = new (&allocData) QVariant(metaType);
type = QVariantWrappedType;
- return ExecutionEngine::metaTypeFromJS(value, metaType, qvariantPtr->data());
+ if (ExecutionEngine::metaTypeFromJS(value, metaType, qvariantPtr->data()))
+ return true;
+
+ const QVariant v = ExecutionEngine::toVariant(value, metaType);
+ return QMetaType::convert(v.metaType(), v.constData(), metaType, qvariantPtr->data());
}
ReturnedValue CallArgument::toValue(ExecutionEngine *engine)