aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-22 10:40:32 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-02-24 08:33:34 +0100
commite6bcb7e2a68582303976448b32227d4170847c4a (patch)
tree591ea2284cc9fe14688968b90deac9da6a6eb672
parente3ac1db9abe0cef47648072dbe2327be7299c7d4 (diff)
QtQuick.Shapes: Declare dependency on QtQuick
Otherwise qmllint and other tools won't know what QQuickItem is in this context. Change-Id: I68da08cf2c41f17a2623f30303ac8f66b7b9329a Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 1a4b0929de72d533c56dd38a9eaf49d21f16e197)
-rw-r--r--src/imports/shapes/CMakeLists.txt2
-rw-r--r--tests/auto/qml/qmllint/data/shapes.qml8
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/imports/shapes/CMakeLists.txt b/src/imports/shapes/CMakeLists.txt
index 78f6d9f448..01b3c9506f 100644
--- a/src/imports/shapes/CMakeLists.txt
+++ b/src/imports/shapes/CMakeLists.txt
@@ -9,6 +9,8 @@ qt_internal_add_qml_module(qmlshapesplugin
VERSION "${CMAKE_PROJECT_VERSION}"
CLASSNAME QmlShapesPlugin
SKIP_TYPE_REGISTRATION
+ DEPENDENCIES
+ QtQuick
SOURCES
plugin.cpp
PUBLIC_LIBRARIES
diff --git a/tests/auto/qml/qmllint/data/shapes.qml b/tests/auto/qml/qmllint/data/shapes.qml
new file mode 100644
index 0000000000..9ca4c1e18b
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/shapes.qml
@@ -0,0 +1,8 @@
+import QtQuick.Shapes
+
+Shape {
+ opacity: 0.2
+ width: 20
+ height: parent.height
+ containsMode: Shape.FillContains
+}
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 9c0077582e..22e3004db1 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -383,6 +383,7 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("attached") << QStringLiteral("attached.qml");
QTest::newRow("enumProperty") << QStringLiteral("enumProperty.qml");
QTest::newRow("externalEnumProperty") << QStringLiteral("externalEnumProperty.qml");
+ QTest::newRow("shapes") << QStringLiteral("shapes.qml");
}
void TestQmllint::cleanQmlCode()