diff options
author | Craig Scott <craig.scott@qt.io> | 2021-09-01 15:17:03 +1000 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-01 07:34:23 +0000 |
commit | 8b53d412fadf51babe605c888fac8d72e3117013 (patch) | |
tree | e23b6c8da280c0d6f44379303274e7494b6f6a18 | |
parent | 4e69df0b6247d49e513637bbd070b82a29b5f2bb (diff) |
Ensure versionless wrappers do not introduce a new variable scope
Using function instead of macro prevented the wrappers from being able
to pass back any variables set by the wrapped function in the calling
scope. Prefer macros to avoid future changes which might do this from
silently swallowing such variable setting.
Task-number: QTBUG-96121
Change-Id: I77f924009b2eae41d89fdc09a2b72eece0937f09
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit d7cb318f41686f7a43f67d8af0b0539b9dd8f78c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/activeqt/container/Qt6AxContainerMacros.cmake | 4 | ||||
-rw-r--r-- | src/activeqt/control/Qt6AxServerMacros.cmake | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/activeqt/container/Qt6AxContainerMacros.cmake b/src/activeqt/container/Qt6AxContainerMacros.cmake index 7c53c06..5816b30 100644 --- a/src/activeqt/container/Qt6AxContainerMacros.cmake +++ b/src/activeqt/container/Qt6AxContainerMacros.cmake @@ -94,7 +94,7 @@ C indentifier") endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_target_typelibs) + macro(qt_target_typelibs) qt6_target_typelibs(${ARGV}) - endfunction() + endmacro() endif() diff --git a/src/activeqt/control/Qt6AxServerMacros.cmake b/src/activeqt/control/Qt6AxServerMacros.cmake index 0e6bcad..9b50cdc 100644 --- a/src/activeqt/control/Qt6AxServerMacros.cmake +++ b/src/activeqt/control/Qt6AxServerMacros.cmake @@ -88,13 +88,13 @@ target will be a separate file.\"") endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - function(qt_add_axserver_executable) + macro(qt_add_axserver_executable) qt6_add_axserver_executable(${ARGV}) - endfunction() - function(qt_add_axserver_library) + endmacro() + macro(qt_add_axserver_library) qt6_add_axserver_library(${ARGV}) - endfunction() - function(qt_target_idl) + endmacro() + macro(qt_target_idl) qt6_target_idl(${ARGV}) - endfunction() + endmacro() endif() |