diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-16 11:00:04 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-19 13:14:11 +0100 |
commit | 33937b28180d8e653e47b9e34c03972553976c6f (patch) | |
tree | 56a0240072cb3d1d4a4dfad8b45d6398413d4a6b | |
parent | f74d278994d35a3ac154ddd411009a785dd46800 (diff) |
Layouts: Depend on QtQuick
If we don't declare the dependency our tools won't figure out where
QQuickItem comes from when analyzing the dependency hierarchy of
layouts.
Change-Id: I389c9e513a3a65143aa6b6fbf508eee584970181
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit fe7318a6cf4398802f919766f2ac585bd844cf48)
-rw-r--r-- | src/imports/layouts/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/data/layouts.qml | 7 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/imports/layouts/CMakeLists.txt b/src/imports/layouts/CMakeLists.txt index f0f957c024..6cfb911ba9 100644 --- a/src/imports/layouts/CMakeLists.txt +++ b/src/imports/layouts/CMakeLists.txt @@ -11,6 +11,8 @@ qt_internal_add_qml_module(qquicklayoutsplugin DESIGNER_SUPPORTED CLASSNAME QtQuickLayoutsPlugin SKIP_TYPE_REGISTRATION + DEPENDENCIES + QtQuick PLUGIN_OPTIONAL SOURCES plugin.cpp diff --git a/tests/auto/qml/qmllint/data/layouts.qml b/tests/auto/qml/qmllint/data/layouts.qml new file mode 100644 index 0000000000..9051e93d36 --- /dev/null +++ b/tests/auto/qml/qmllint/data/layouts.qml @@ -0,0 +1,7 @@ +import QtQuick +import QtQuick.Layouts + +Item { + ColumnLayout { id: lll } + property real layoutX: lll.x +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index 8a07391ed0..c8e0dd2db3 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -365,6 +365,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("multiExtension") << QStringLiteral("multiExtension.qml"); QTest::newRow("segFault") << QStringLiteral("SegFault.qml"); QTest::newRow("grouped scope failure") << QStringLiteral("groupedScope.qml"); + QTest::newRow("layouts depends quick") << QStringLiteral("layouts.qml"); } void TestQmllint::cleanQmlCode() |