aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsutils.cpp
diff options
context:
space:
mode:
authorSemih Yavuz <semih.yavuz@qt.io>2023-01-30 22:33:00 +0100
committerSemih Yavuz <semih.yavuz@qt.io>2023-01-31 19:12:30 +0100
commit66bc0019684519e6ccf3c9910c1bbd9902a13911 (patch)
tree2acf3aa4b7a23d28beef35b85f4d77594dc3b492 /src/qmlcompiler/qqmljsutils.cpp
parentdb71a35b1e20b028e4e07c8229551fea8ac0eafb (diff)
qmlcachegen: fix nonstrict equality code generation
We should generate type checking code for only strict comparison of var against null/undefined types or vice versa cases. The non- strict comparison should be handled elsewhere. Removed pragma Strict to allow to add warning emitting tests of non-strict comparison. This amends 6a816a9e0dfc2b41a4f86c721679f2517ec27eb6 Pick-to: 6.5 Fixes: QTBUG-110769 Change-Id: I7f9a457e71a621a005f377216e841bec01667454 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsutils.cpp')
-rw-r--r--src/qmlcompiler/qqmljsutils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljsutils.cpp b/src/qmlcompiler/qqmljsutils.cpp
index b582bf67fc..410f6b0d14 100644
--- a/src/qmlcompiler/qqmljsutils.cpp
+++ b/src/qmlcompiler/qqmljsutils.cpp
@@ -202,9 +202,9 @@ QQmlJSUtils::sourceDirectoryPath(const QQmlJSImporter *importer, const QString &
Utility method that checks if one of the registers is var, and the other can be
efficiently compared to it
*/
-bool canCompareWithVar(const QQmlJSTypeResolver *typeResolver,
- const QQmlJSRegisterContent &lhsContent,
- const QQmlJSRegisterContent &rhsContent)
+bool canStrictlyCompareWithVar(const QQmlJSTypeResolver *typeResolver,
+ const QQmlJSRegisterContent &lhsContent,
+ const QQmlJSRegisterContent &rhsContent)
{
Q_ASSERT(typeResolver);
const auto varType = typeResolver->varType();