From d7cb318f41686f7a43f67d8af0b0539b9dd8f78c Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Wed, 1 Sep 2021 15:17:03 +1000 Subject: 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 Pick-to: 6.2 Change-Id: I77f924009b2eae41d89fdc09a2b72eece0937f09 Reviewed-by: Joerg Bornemann --- src/activeqt/container/Qt6AxContainerMacros.cmake | 4 ++-- 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() -- cgit v1.2.3