summaryrefslogtreecommitdiff
path: root/src/qml/jsruntime/qv4function.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-10-27 11:47:05 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2022-12-15 14:03:55 +0100
commitdfdba3b12bc10a3e1da8cde99a8697969ac165ef (patch)
treee653dbb43f77a8ff156047acdcefcc49708e294b /src/qml/jsruntime/qv4function.cpp
parent7d5cc737db18b321f224eef168639382d3f1f4b9 (diff)
downloadqtdeclarative-dfdba3b12bc10a3e1da8cde99a8697969ac165ef.tar.gz
QQuickStates: Handle more types as result of when
When calling QQmlBinding::evaluate(), we get a generic QVariant back, and no conversions from the evaluation result to bool are done at that point. Consequently, we would need to mirror the engines conversion from arbitrary values to bool. Doing that manually is rather fragile, so we instead use the QMetaType based overload, which already takes care of the conversion. That requires making the overload public. As qmlsc is already using that overload from within evaluate, it was not affected by the bug. Fixes: QTBUG-108024 Pick-to: 6.2 6.4 6.5 Change-Id: I3d5ee8f886ea6ada44fc8182300f3472cb1efc3c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
0 files changed, 0 insertions, 0 deletions