aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-02-17 17:23:10 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-02-18 12:13:47 +0100
commit795d7dafe5be5cd48aa8225a1343285b3aca2be7 (patch)
tree0eeca097ec579458b5aa6ac9bfb8c411c48e3f0f /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parent4c716dd19cf88349acc33eddae28c4e9222a3800 (diff)
QmlCompiler: Do not generate block comments into C++ code
The code we're commenting could again contain block comments. You cannot nest them. Pick-to: 6.2 6.3 Fixes: QTBUG-100978 Change-Id: I78685bf29dd30f05e5a3b17abc43ba0b4cb6849e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index b04eb011b3..1863b92c64 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -118,6 +118,7 @@ private slots:
void invisibleBase();
void notEqualsInt();
void infinities();
+ void blockComments();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -1776,6 +1777,16 @@ void tst_QmlCppCodegen::infinities()
QVERIFY(qIsNaN(o->property("naN").toDouble()));
}
+void tst_QmlCppCodegen::blockComments()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/TestTypes/blockComments.qml"_qs));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(o);
+ QCOMPARE(o->property("implicitHeight").toDouble(), 8.0);
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
if (qEnvironmentVariableIsSet("QV4_FORCE_INTERPRETER"))