aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2024-04-17 14:13:50 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2024-04-17 14:44:34 +0200
commitb71622f85b88f3c897244fe925849a8f9f9b2e0e (patch)
tree3a13a2d553e612d364113698c850a27e3ff66aeb
parent44aa39f92ecb06c8ad4dc0b808a6ab340c1bb95c (diff)
QDS Components: Allow disabling lint targets
QDS Components is brought into user projects via FetchConent. When this is done, all qt_internal_add_qml_module call will add their lint target to the all_qmllint target; however, the user most likely won't care about warnings therein. Ideally, QDS would be warning free, but even if it were, it is wasteful to run qmllint on it when it is only brought in via FetchContent. By setting QT_QDS_COMPONENTS_NOWARN before FetchContent is called, we can indicate that linting ought to be disabled. Change-Id: I45351f6e401fa173848728b70f9d18e7347bca98 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/imports/application/CMakeLists.txt1
-rw-r--r--src/imports/compatibility/QtAndroidAutomotive/ActivityView/CMakeLists.txt1
-rw-r--r--src/imports/components/CMakeLists.txt1
-rw-r--r--src/imports/effects_qt6/CMakeLists.txt1
-rw-r--r--src/imports/flowview/CMakeLists.txt1
-rw-r--r--src/imports/logichelper/CMakeLists.txt1
7 files changed, 11 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 73f035a..4d3acee 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,9 @@
###qt_path_join(targetbasedir ${CMAKE_BINARY_DIR} "qml")
###qt_path_join(qmlinstalldir ${QT_INSTALL_DIR} ${INSTALL_QMLDIR})
+set(qds_qml_extra_args "")
+if(QT_QDS_COMPONENTS_NOWARN)
+ list(APPEND qds_qml_extra_args NO_LINT)
+endif()
+
add_subdirectory(imports)
diff --git a/src/imports/application/CMakeLists.txt b/src/imports/application/CMakeLists.txt
index 450361b..03e6205 100644
--- a/src/imports/application/CMakeLists.txt
+++ b/src/imports/application/CMakeLists.txt
@@ -8,6 +8,7 @@ qt6_add_qml_module(QuickStudioApplication
VERSION "${PROJECT_VERSION}"
RESOURCE_PREFIX "/qt-project.org/imports"
DESIGNER_SUPPORTED
+ ${qds_qml_extra_args}
SOURCES
quickstudioapplication.cpp quickstudioapplication_p.h
)
diff --git a/src/imports/compatibility/QtAndroidAutomotive/ActivityView/CMakeLists.txt b/src/imports/compatibility/QtAndroidAutomotive/ActivityView/CMakeLists.txt
index cd6d69c..f322209 100644
--- a/src/imports/compatibility/QtAndroidAutomotive/ActivityView/CMakeLists.txt
+++ b/src/imports/compatibility/QtAndroidAutomotive/ActivityView/CMakeLists.txt
@@ -4,6 +4,7 @@ qt_internal_add_qml_module(AndroidAutomotiveActivityView
DESIGNER_SUPPORTED
NO_SYNC_QT
PAST_MAJOR_VERSIONS 1
+ ${qds_qml_extra_args}
QML_FILES
ActivityView.qml
)
diff --git a/src/imports/components/CMakeLists.txt b/src/imports/components/CMakeLists.txt
index ad6df51..08f2814 100644
--- a/src/imports/components/CMakeLists.txt
+++ b/src/imports/components/CMakeLists.txt
@@ -5,6 +5,7 @@ qt6_add_qml_module(QuickStudioComponents
RESOURCE_PREFIX "/qt-project.org/imports"
DESIGNER_SUPPORTED
PAST_MAJOR_VERSIONS 1
+ ${qds_qml_extra_args}
QML_FILES
ArcItem.qml
PieItem.qml
diff --git a/src/imports/effects_qt6/CMakeLists.txt b/src/imports/effects_qt6/CMakeLists.txt
index 27a4067..41b36ce 100644
--- a/src/imports/effects_qt6/CMakeLists.txt
+++ b/src/imports/effects_qt6/CMakeLists.txt
@@ -5,6 +5,7 @@ qt6_add_qml_module(QuickStudioEffects
RESOURCE_PREFIX "/qt-project.org/imports"
DESIGNER_SUPPORTED
PAST_MAJOR_VERSIONS 1
+ ${qds_qml_extra_args}
NO_LINT
NO_CACHEGEN
QML_FILES
diff --git a/src/imports/flowview/CMakeLists.txt b/src/imports/flowview/CMakeLists.txt
index dea4052..f3874ab 100644
--- a/src/imports/flowview/CMakeLists.txt
+++ b/src/imports/flowview/CMakeLists.txt
@@ -9,6 +9,7 @@ qt6_add_qml_module(FlowView
RESOURCE_PREFIX "/qt-project.org/imports"
DESIGNER_SUPPORTED
PAST_MAJOR_VERSIONS 1
+ ${qds_qml_extra_args}
NO_GENERATE_QMLDIR
NO_LINT
NO_CACHEGEN
diff --git a/src/imports/logichelper/CMakeLists.txt b/src/imports/logichelper/CMakeLists.txt
index 93c0fa7..c6c6c84 100644
--- a/src/imports/logichelper/CMakeLists.txt
+++ b/src/imports/logichelper/CMakeLists.txt
@@ -5,6 +5,7 @@ qt6_add_qml_module(QuickStudioLogicHelper
RESOURCE_PREFIX "/qt-project.org/imports"
DESIGNER_SUPPORTED
PAST_MAJOR_VERSIONS 1
+ ${qds_qml_extra_args}
QML_FILES
BidirectionalBinding.qml
RangeMapper.qml