diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/moveRegVoid.qml | 20 | ||||
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt index 02e0f06deb..95bc78a96a 100644 --- a/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt +++ b/tests/auto/qml/qmlcppcodegen/data/CMakeLists.txt @@ -86,6 +86,7 @@ set(qml_files math.qml methods.qml modulePrefix.qml + moveRegVoid.qml noBindingLoop.qml noQQmlData.qml nonNotifyable.qml diff --git a/tests/auto/qml/qmlcppcodegen/data/moveRegVoid.qml b/tests/auto/qml/qmlcppcodegen/data/moveRegVoid.qml new file mode 100644 index 0000000000..f1e78babba --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/moveRegVoid.qml @@ -0,0 +1,20 @@ +import QtQuick + +Rectangle { + id: root + property bool translucency: false + + gradient: Gradient { + id: grad + } + + onTranslucencyChanged: { + if (translucency) { + root.color = "transparent"; + root.gradient = null; + } else { + root.color = "white"; + root.gradient = grad; + } + } +} diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 46e0b4fb90..2c53e5da08 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -651,6 +651,7 @@ void tst_QmlCppCodegen::interestingFiles_data() QTest::addRow("curlygrouped") << u"curlygrouped.qml"_qs << true; QTest::addRow("cycleHead") << u"cycleHead.qml"_qs << false; QTest::addRow("deadStoreLoop") << u"deadStoreLoop.qml"_qs << true; + QTest::addRow("moveRegVoid") << u"moveRegVoid.qml"_qs << true; } void tst_QmlCppCodegen::interestingFiles() |