From 71b4a5e6dfe07fe30c59b3e84c9db27f443a7b92 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 8 May 2023 14:59:27 +0200 Subject: 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 --- src/qmlcompiler/qqmljstyperesolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.1