aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/tst_qmllint.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-06 12:29:00 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-07 11:25:40 +0000
commit3633047d812559fc91d6f6324c4677bd886ef7fd (patch)
treef39250b047dda6a53ffd3c01c24daa80355b0b03 /tests/auto/qml/qmllint/tst_qmllint.cpp
parent26fa3d2cef8ec55dfb276e999d41e01e9a846093 (diff)
QmlCompiler: Use the declared typeinfos rather than the default
... and produce a warning when encountering the default. This shows us that the qmake build omits some typeinfo entries from common modules. Add those. Change-Id: I1c7e87e8a54ef24a6076090e6051eb1c03c09b2a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint/tst_qmllint.cpp')
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 75938161b5..1b77e941ab 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -51,6 +51,7 @@ private Q_SLOTS:
void testUnknownCausesFail();
void directoryPassedAsQmlTypesFile();
+ void oldQmltypes();
private:
QString runQmllint(const QString &fileToLint,
@@ -133,6 +134,12 @@ void TestQmllint::directoryPassedAsQmlTypesFile()
"Expected error to contain \"%1\", but it didn't: %2").arg(expectedError, errorMessages)));
}
+void TestQmllint::oldQmltypes()
+{
+ const QString errors = runQmllint("oldQmltypes.qml", true);
+ QVERIFY(errors.contains(QStringLiteral("Warning: typeinfo not declared in qmldir file")));
+}
+
void TestQmllint::dirtyQmlCode_data()
{
QTest::addColumn<QString>("filename");