summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-05-08 14:59:27 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-05-09 21:28:07 +0200
commit71b4a5e6dfe07fe30c59b3e84c9db27f443a7b92 (patch)
treef560cd6a67c7f555a00a1d03d495e854e9196573 /src
parent41f36038fb2618561b2405efbdaf7ccd5bf3769d (diff)
downloadqtdeclarative-71b4a5e6dfe07fe30c59b3e84c9db27f443a7b92.tar.gz
QmlCompiler: Re-allow conversion from QObject to QString
It only worked for the console functions in 6.5. There it was suppressed by the enforcement of type conversions in the basic blocks pass in dev. We have, however, a good enough way to coerce QObject to QString these days. Task-number: QTBUG-112291 Change-Id: I025976cc7fbe430c5cdc607cae3ca48838b24f88 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qmlcompiler/qqmljstyperesolver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljstyperesolver.cpp b/src/qmlcompiler/qqmljstyperesolver.cpp
index b48749a96b..7fb37f3dfa 100644
--- a/src/qmlcompiler/qqmljstyperesolver.cpp
+++ b/src/qmlcompiler/qqmljstyperesolver.cpp
@@ -1087,7 +1087,7 @@ bool QQmlJSTypeResolver::canPrimitivelyConvertFromTo(
if (isNumeric(from) && equals(to, m_boolType))
return true;
if (from->accessSemantics() == QQmlJSScope::AccessSemantics::Reference
- && equals(to, m_boolType)) {
+ && (equals(to, m_boolType) || equals(to, m_stringType))) {
return true;
}