aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4qobjectwrapper.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-10-19 15:22:25 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-10-20 15:51:23 +0200
commitbf115a446c1a633a11577306eff8a78028a7f5b5 (patch)
tree8a2cd7650fe9d5ace7bdfdaa31669fccd8f1021a /src/qml/jsruntime/qv4qobjectwrapper.cpp
parent974e2c668ae6e942f9e5d3eda8d77b1893af371f (diff)
Improve type conversions from/to QJSValue
We can convert everything into a QJSValue if we have an engine and we can save a binding function in a QVariant by wrapping it into QJSValue. Change-Id: I48e7c13f3f744f1c50bf673b427fe9331250f313 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4qobjectwrapper.cpp')
-rw-r--r--src/qml/jsruntime/qv4qobjectwrapper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp
index 6657f3d6fc..517fbab6f1 100644
--- a/src/qml/jsruntime/qv4qobjectwrapper.cpp
+++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp
@@ -475,7 +475,9 @@ bool QObjectWrapper::setQmlProperty(
return true;
}
-void QObjectWrapper::setProperty(ExecutionEngine *engine, QObject *object, QQmlPropertyData *property, const Value &value)
+void QObjectWrapper::setProperty(
+ ExecutionEngine *engine, QObject *object,
+ const QQmlPropertyData *property, const Value &value)
{
if (!property->isWritable() && !property->isQList()) {
QString error = QLatin1String("Cannot assign to read-only property \"") +