diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-24 19:43:42 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-25 09:26:18 +0200 |
commit | f25e4c60f6ff2c200d2bf1c94d0dafa966c5c98f (patch) | |
tree | b4bcb5a7e76affa637112213edf34a2a88a6ce87 /src/qml/qml/qqmlpropertybinding.cpp | |
parent | d48b87450327e710f7b0a843627624aa67cae116 (diff) |
QQmlPropertyBinding: convert to correct type
Change-Id: I5b7b4d670c6308b33a2fd0580790934345bb3504
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertybinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlpropertybinding.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlpropertybinding.cpp b/src/qml/qml/qqmlpropertybinding.cpp index c8442cf510..acd5978961 100644 --- a/src/qml/qml/qqmlpropertybinding.cpp +++ b/src/qml/qml/qqmlpropertybinding.cpp @@ -108,8 +108,10 @@ QUntypedPropertyBinding::BindingEvaluationResult QQmlPropertyBinding::evaluate(c } QVariant resultVariant(scope.engine->toVariant(result, metaType.id())); - QMetaType::destruct(metaType.id(), dataPtr); - QMetaType::construct(metaType.id(), dataPtr, resultVariant.constData()); + auto metaTypeId= metaType.id(); + resultVariant.convert(metaTypeId); + QMetaType::destruct(metaTypeId, dataPtr); + QMetaType::construct(metaTypeId, dataPtr, resultVariant.constData()); return QPropertyBindingError::NoError; } |