aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-06 11:35:30 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-07 13:26:09 +0200
commitfe013bdbaecd9605ebf715215cef3cd82c1a712f (patch)
tree1853e6ec6eb8dec4cc97d0f02c3ed63d3af00b09 /tests/auto/qml/qmllint
parent3633047d812559fc91d6f6324c4677bd886ef7fd (diff)
qmllint: Read deprecated dependency specifications from qmltypes files
And produce a warning when doing so. Task-number: QTBUG-87164 Change-Id: I75eab97a37af1268a310e88e3ac6a625127a7f62 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r--tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes2
-rw-r--r--tests/auto/qml/qmllint/data/oldQmltypes.qml1
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp2
3 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes b/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes
index eab91f6723..71a515d8c5 100644
--- a/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes
+++ b/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes
@@ -1,7 +1,9 @@
import QtQuick.tooling 1.2
Module {
+ dependencies: [ "QtQuick 2.15" ]
Component {
name: "Frame"
+ prototype: "QQuickItem"
exports: ["OldQmltypes/Frame 1.0"]
exportMetaObjectRevisions: [0]
}
diff --git a/tests/auto/qml/qmllint/data/oldQmltypes.qml b/tests/auto/qml/qmllint/data/oldQmltypes.qml
index f33d4d90fe..80980be451 100644
--- a/tests/auto/qml/qmllint/data/oldQmltypes.qml
+++ b/tests/auto/qml/qmllint/data/oldQmltypes.qml
@@ -1,4 +1,5 @@
import OldQmltypes 1.0
Frame {
+ x: 15
}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 1b77e941ab..0b78285c23 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -138,6 +138,8 @@ void TestQmllint::oldQmltypes()
{
const QString errors = runQmllint("oldQmltypes.qml", true);
QVERIFY(errors.contains(QStringLiteral("Warning: typeinfo not declared in qmldir file")));
+ QVERIFY(!errors.contains(QStringLiteral("Warning: QQuickItem was not found. Did you add all import paths?")));
+ QVERIFY(errors.contains(QStringLiteral("Warning: Found deprecated dependency specifications")));
}
void TestQmllint::dirtyQmlCode_data()