summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-09-01 15:17:03 +1000
committerCraig Scott <craig.scott@qt.io>2021-09-01 17:24:01 +1000
commitd7cb318f41686f7a43f67d8af0b0539b9dd8f78c (patch)
treeb32b3c6b3b975a92f2ec307e2e99ea10f741227d
parentcf6be248200ab26a7104d833894df466578afcc7 (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 Pick-to: 6.2 Change-Id: I77f924009b2eae41d89fdc09a2b72eece0937f09 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/activeqt/container/Qt6AxContainerMacros.cmake4
-rw-r--r--src/activeqt/control/Qt6AxServerMacros.cmake12
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()