From 716619e43edaaaa4daff96be28760cc8cfcfcf66 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 6 Oct 2020 10:24:53 +0200 Subject: Have templates depend on QtQuick Templates defines a number of C++-based QML types, most of those are derived from QQuickItem. Therefore, it actually needs QtQuick although it never explicitly imports QtQuick. In order for tools to figure that out, declare the QtQuick dependency in the qmldir file. Task-number: QTBUG-87164 Change-Id: I982b4ee57102ac62b0ee6e8559e34c5e203a7a0f Reviewed-by: Maximilian Goldstein Reviewed-by: Mitch Curtis --- src/imports/templates/.prev_CMakeLists.txt | 2 ++ src/imports/templates/CMakeLists.txt | 2 ++ src/imports/templates/qmldir | 1 + 3 files changed, 5 insertions(+) diff --git a/src/imports/templates/.prev_CMakeLists.txt b/src/imports/templates/.prev_CMakeLists.txt index 7799ab66..cd6a68f9 100644 --- a/src/imports/templates/.prev_CMakeLists.txt +++ b/src/imports/templates/.prev_CMakeLists.txt @@ -8,6 +8,8 @@ qt_internal_add_qml_module(qtquicktemplates2plugin URI "QtQuick.Templates" VERSION "${CMAKE_PROJECT_VERSION}" CLASSNAME QtQuickTemplates2Plugin + DEPENDENCIES + QtQuick/auto SKIP_TYPE_REGISTRATION SOURCES qtquicktemplates2plugin.cpp diff --git a/src/imports/templates/CMakeLists.txt b/src/imports/templates/CMakeLists.txt index aa4a1b37..0339fd99 100644 --- a/src/imports/templates/CMakeLists.txt +++ b/src/imports/templates/CMakeLists.txt @@ -8,6 +8,8 @@ qt_internal_add_qml_module(qtquicktemplates2plugin URI "QtQuick.Templates" VERSION "6.0" # special case CLASSNAME QtQuickTemplates2Plugin + DEPENDENCIES + QtQuick/auto SKIP_TYPE_REGISTRATION SOURCES qtquicktemplates2plugin.cpp diff --git a/src/imports/templates/qmldir b/src/imports/templates/qmldir index a143a6cb..c8d89c58 100644 --- a/src/imports/templates/qmldir +++ b/src/imports/templates/qmldir @@ -1,3 +1,4 @@ module QtQuick.Templates plugin qtquicktemplates2plugin classname QtQuickTemplates2Plugin +depends QtQuick auto -- cgit v1.2.3