diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-11-01 14:12:53 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-11-04 01:29:18 +0100 |
commit | cebb3a732041d4254e8fd1a0b41e19f027351e92 (patch) | |
tree | 12b73840877301fc281e8ef80e1b2cb07f42abc4 /tests/auto/qml/qmlcppcodegen | |
parent | 048c8f226ae09b79264e5dfc51f5d8fe7a8332a9 (diff) |
QmlCompiler: Optimize trivial as-casts out
If you as-cast to a base type, we don't have to do any actual check.
Furthermore, retain the content variant through as-casts and print a
nicer error message if we cannot generate efficient code for an internal
conversion.
Task-number: QTBUG-117800
Change-Id: Iedaf4ca411be429eec6c9f23b9bd7f20794592ce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index e60da423e3..6b4f604d00 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -4237,7 +4237,7 @@ void tst_QmlCppCodegen::valueTypeBehavior() + u":8: TypeError: Cannot read property 'x' of undefined"_s)); o->setProperty("v", QLatin1String("not a rect")); - // If the binding throws an exception, the value doesn't change. + // If the binding throws an exception, the value doesn't change. QCOMPARE(o->property("x"), 10); } } |