diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-01-25 10:44:45 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-01 09:34:19 +0100 |
commit | 25aab20ad3fa63acc7d76be022a4303f005a9f8a (patch) | |
tree | b2adeb5e2e1aa81a2b39e8abb42101ac8f6b3640 /src/qml/Qt6QmlBuildInternals.cmake | |
parent | 7efcb0e34933ee6ac29f9de35c0fe7146049c221 (diff) |
Move registrations functions into the Qt namespace
It's high time we do this. We should not clobber the global namespace
with type registration functions if the user has explicitly provided a
namespace for Qt.
Change-Id: Ibac49cb1c8976e65ea15d7a07d25ea1a5325a60a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index a155c963df..87daf8688f 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -300,6 +300,11 @@ function(qt_internal_add_qml_module target) message(FATAL_ERROR "Do not set FOLLOW_FOREIGN_VERSIONING for module ${target}. It is already set by default for internal modules.") endif() + get_target_property(qt_namespace ${QT_CMAKE_EXPORT_NAMESPACE}::Core _qt_namespace) + if(qt_namespace) + list(APPEND add_qml_module_args NAMESPACE ${qt_namespace}) + endif() + # Update the backing and plugin targets with qml-specific things. qt6_add_qml_module(${target} ${add_qml_module_args} |