aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmltc_qprocess
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-12-15 11:38:30 +0100
committerAndrei Golubev <andrei.golubev@qt.io>2021-12-17 16:46:52 +0100
commit8fac197ba20cca5a85f8caedf4cb3e4f4c7ac553 (patch)
treea109ff41ff8f910e7ce6a342d5b2460a30b33efe /tests/auto/qml/qmltc_qprocess
parent9cf864654f9154be52a7279a341948eabacfb397 (diff)
qmltc: Explicitly reject inline components
Because they seem to be hard and there's little reason to invest in their support immediately Task-number: QTBUG-84368 Pick-to: 6.3 Change-Id: If056aa401d8f54d067eb583669074cb3f6bfd304 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltc_qprocess')
-rw-r--r--tests/auto/qml/qmltc_qprocess/CMakeLists.txt1
-rw-r--r--tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml5
-rw-r--r--tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp11
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qml/qmltc_qprocess/CMakeLists.txt b/tests/auto/qml/qmltc_qprocess/CMakeLists.txt
index 4e467cf2e4..e6a031ddcf 100644
--- a/tests/auto/qml/qmltc_qprocess/CMakeLists.txt
+++ b/tests/auto/qml/qmltc_qprocess/CMakeLists.txt
@@ -11,6 +11,7 @@ qt6_add_qml_module(tst_qmltc_qprocess
URI QmltcQProcessTests
QML_FILES
data/dummy.qml
+ data/inlineComponent.qml
)
add_dependencies(tst_qmltc_qprocess Qt::qmltc)
diff --git a/tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml b/tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml
new file mode 100644
index 0000000000..f8515b6d1b
--- /dev/null
+++ b/tests/auto/qml/qmltc_qprocess/data/inlineComponent.qml
@@ -0,0 +1,5 @@
+import QtQml
+QtObject {
+ component InlineType : QtObject { }
+ property QtObject dummy: InlineType {}
+}
diff --git a/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp b/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp
index 37acf9223a..6f12e585ba 100644
--- a/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp
+++ b/tests/auto/qml/qmltc_qprocess/tst_qmltc_qprocess.cpp
@@ -67,6 +67,7 @@ private slots:
void sanity();
void noBuiltins();
void noQtQml();
+ void inlineComponent();
};
void tst_qmltc_qprocess::initTestCase()
@@ -85,7 +86,8 @@ void tst_qmltc_qprocess::initTestCase()
QVERIFY(QDir(m_tmpPath).removeRecursively()); // in case it's already there
QVERIFY(QDir().mkpath(m_tmpPath));
- m_resourcePaths = { { u"dummy.qml"_qs, u"data/dummy.qml"_qs } };
+ m_resourcePaths = { { u"dummy.qml"_qs, u"data/dummy.qml"_qs },
+ { u"inlineComponent.qml"_qs, u"data/inlineComponent.qml"_qs } };
}
void tst_qmltc_qprocess::cleanupTestCase()
@@ -189,5 +191,12 @@ void tst_qmltc_qprocess::noQtQml()
QVERIFY(errors.contains(u"Failed to import QtQml. Are your include paths set up properly?"_qs));
}
+void tst_qmltc_qprocess::inlineComponent()
+{
+ const auto errors = runQmltc(u"inlineComponent.qml"_qs, false);
+ QEXPECT_FAIL("", "qmltc does not support inline components at the moment", Continue);
+ QVERIFY(!errors.contains(u"Inline components are not supported"_qs));
+}
+
QTEST_MAIN(tst_qmltc_qprocess)
#include "tst_qmltc_qprocess.moc"