diff options
author | Craig Scott <craig.scott@qt.io> | 2021-08-25 22:22:31 +1000 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-30 12:42:29 +0000 |
commit | a462d224d821788057fcc5ebf8d124c3f8f2078c (patch) | |
tree | 2ceb6872025db8d370b50d59c6f41810c018384b /src | |
parent | d755763530e8347c18aafa13a24d3fc805431815 (diff) |
Rename source property to QT_QML_SOURCE_VERSIONS
The old name was the singular form, but the property accepts a list of
versions, so plural form is more appropriate. Still support the old
singular name with an author warning, since it was part of tech preview
and some code might be using it.
Change-Id: I2dbd9b1809bae6f608b222577b2f37a7dc94805d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d8bc85e79a7b9ea40cc96a53fb6a312dd4b06cb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/tooling/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/qml/Qt6QmlMacros.cmake | 22 | ||||
-rw-r--r-- | src/quickcontrols2/basic/CMakeLists.txt | 30 | ||||
-rw-r--r-- | src/quickcontrols2/fusion/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/quickcontrols2/imagine/CMakeLists.txt | 18 | ||||
-rw-r--r-- | src/quickcontrols2/material/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/quickcontrols2/universal/CMakeLists.txt | 22 |
7 files changed, 78 insertions, 60 deletions
diff --git a/src/imports/tooling/CMakeLists.txt b/src/imports/tooling/CMakeLists.txt index a39f9ee91b..f8daf9f4eb 100644 --- a/src/imports/tooling/CMakeLists.txt +++ b/src/imports/tooling/CMakeLists.txt @@ -10,7 +10,7 @@ set(qml_files ) set_source_files_properties(${qml_files} PROPERTIES - QT_QML_SOURCE_VERSION "1.2;6.0" + QT_QML_SOURCE_VERSIONS "1.2;6.0" ) qt_internal_add_qml_module(quicktooling diff --git a/src/qml/Qt6QmlMacros.cmake b/src/qml/Qt6QmlMacros.cmake index cf6cca0e38..cc58b77240 100644 --- a/src/qml/Qt6QmlMacros.cmake +++ b/src/qml/Qt6QmlMacros.cmake @@ -1480,8 +1480,26 @@ function(qt6_target_qml_sources target) # Do not add qmldir entries for lowercase names. Those are not components. if (qml_file_typename MATCHES "^[A-Z]") - # TODO: rename to QT_QML_SOURCE_VERSIONS - get_source_file_property(qml_file_versions ${qml_file_src} QT_QML_SOURCE_VERSION) + # We previously accepted the singular form of this property name + # during tech preview. Issue a warning for that, but still + # honor it. The plural form will override it if both are set. + get_property(have_singular_property SOURCE ${qml_file_src} + PROPERTY QT_QML_SOURCE_VERSION SET + ) + if(have_singular_property) + message(AUTHOR_WARNING + "The QT_QML_SOURCE_VERSION source file property has been replaced " + "by QT_QML_SOURCE_VERSIONS (i.e. plural rather than singular). " + "The singular form will eventually be removed, please update " + "the project to use the plural form instead for the file at:\n" + " ${qml_file_src}" + ) + endif() + get_source_file_property(qml_file_versions ${qml_file_src} QT_QML_SOURCE_VERSIONS) + if(NOT qml_file_versions AND have_singular_property) + get_source_file_property(qml_file_versions ${qml_file_src} QT_QML_SOURCE_VERSION) + endif() + get_source_file_property(qml_file_singleton ${qml_file_src} QT_QML_SINGLETON_TYPE) get_source_file_property(qml_file_internal ${qml_file_src} QT_QML_INTERNAL_TYPE) diff --git a/src/quickcontrols2/basic/CMakeLists.txt b/src/quickcontrols2/basic/CMakeLists.txt index c77d1bc3b1..b47f015cc5 100644 --- a/src/quickcontrols2/basic/CMakeLists.txt +++ b/src/quickcontrols2/basic/CMakeLists.txt @@ -63,49 +63,49 @@ set(qml_files "VerticalHeaderView.qml" ) set_source_files_properties(Action.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(ActionGroup.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(DelayButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.2;6.0" + QT_QML_SOURCE_VERSIONS "2.2;6.0" ) set_source_files_properties(Dialog.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(DialogButtonBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(HorizontalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) set_source_files_properties(MenuBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuBarItem.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(RoundButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(ScrollView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.2;6.0" + QT_QML_SOURCE_VERSIONS "2.2;6.0" ) set_source_files_properties(SelectionRectangle.qml PROPERTIES - QT_QML_SOURCE_VERSION "6.2" + QT_QML_SOURCE_VERSIONS "6.2" ) set_source_files_properties(SplitView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.13;6.0" + QT_QML_SOURCE_VERSIONS "2.13;6.0" ) set_source_files_properties(ToolSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(VerticalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) qt_internal_add_qml_module(qtquickcontrols2basicstyleplugin diff --git a/src/quickcontrols2/fusion/CMakeLists.txt b/src/quickcontrols2/fusion/CMakeLists.txt index 92e8a43d32..8a42f9961d 100644 --- a/src/quickcontrols2/fusion/CMakeLists.txt +++ b/src/quickcontrols2/fusion/CMakeLists.txt @@ -55,37 +55,37 @@ set(qml_files "VerticalHeaderView.qml" ) set_source_files_properties(DelayButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.2;6.0" + QT_QML_SOURCE_VERSIONS "2.2;6.0" ) set_source_files_properties(Dialog.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(DialogButtonBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(HorizontalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) set_source_files_properties(MenuBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuBarItem.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(RoundButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(SplitView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.13;6.0" + QT_QML_SOURCE_VERSIONS "2.13;6.0" ) set_source_files_properties(ToolSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(VerticalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) qt_internal_add_qml_module(qtquickcontrols2fusionstyleplugin diff --git a/src/quickcontrols2/imagine/CMakeLists.txt b/src/quickcontrols2/imagine/CMakeLists.txt index 7308135ac2..a91e5d07b3 100644 --- a/src/quickcontrols2/imagine/CMakeLists.txt +++ b/src/quickcontrols2/imagine/CMakeLists.txt @@ -55,31 +55,31 @@ set(qml_files "VerticalHeaderView.qml" ) set_source_files_properties(DelayButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.2;6.0" + QT_QML_SOURCE_VERSIONS "2.2;6.0" ) set_source_files_properties(Dialog.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(DialogButtonBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(HorizontalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) set_source_files_properties(MenuSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(RoundButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(SplitView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.13;6.0" + QT_QML_SOURCE_VERSIONS "2.13;6.0" ) set_source_files_properties(ToolSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(VerticalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) qt_internal_add_qml_module(qtquickcontrols2imaginestyleplugin diff --git a/src/quickcontrols2/material/CMakeLists.txt b/src/quickcontrols2/material/CMakeLists.txt index 86580973c2..f942651cc1 100644 --- a/src/quickcontrols2/material/CMakeLists.txt +++ b/src/quickcontrols2/material/CMakeLists.txt @@ -57,37 +57,37 @@ set(qml_files "VerticalHeaderView.qml" ) set_source_files_properties(DelayButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.2;6.0" + QT_QML_SOURCE_VERSIONS "2.2;6.0" ) set_source_files_properties(Dialog.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(DialogButtonBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(HorizontalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) set_source_files_properties(MenuBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuBarItem.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(RoundButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(SplitView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.13;6.0" + QT_QML_SOURCE_VERSIONS "2.13;6.0" ) set_source_files_properties(ToolSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(VerticalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) qt_internal_add_qml_module(qtquickcontrols2materialstyleplugin diff --git a/src/quickcontrols2/universal/CMakeLists.txt b/src/quickcontrols2/universal/CMakeLists.txt index 914f26a322..d1043f07cc 100644 --- a/src/quickcontrols2/universal/CMakeLists.txt +++ b/src/quickcontrols2/universal/CMakeLists.txt @@ -56,37 +56,37 @@ set(qml_files "VerticalHeaderView.qml" ) set_source_files_properties(DelayButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.2;6.0" + QT_QML_SOURCE_VERSIONS "2.2;6.0" ) set_source_files_properties(Dialog.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(DialogButtonBox.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(HorizontalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) set_source_files_properties(MenuBar.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuBarItem.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.3;6.0" + QT_QML_SOURCE_VERSIONS "2.3;6.0" ) set_source_files_properties(MenuSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(RoundButton.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(SplitView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.13;6.0" + QT_QML_SOURCE_VERSIONS "2.13;6.0" ) set_source_files_properties(ToolSeparator.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.1;6.0" + QT_QML_SOURCE_VERSIONS "2.1;6.0" ) set_source_files_properties(VerticalHeaderView.qml PROPERTIES - QT_QML_SOURCE_VERSION "2.15;6.0" + QT_QML_SOURCE_VERSIONS "2.15;6.0" ) qt_internal_add_qml_module(qtquickcontrols2universalstyleplugin |