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: I293999c8054c2572e9145974a9ffac661f70bf35
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Craig Scott 2021-09-01 14:35:15 +10:00
parent 16d383ce68
commit 0402f082db
2 changed files with 4 additions and 4 deletions

View File

@ -82,7 +82,7 @@ function(qt6_generate_wayland_protocol_client_sources target)
endfunction()
if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
function(qt_generate_wayland_protocol_client_sources)
macro(qt_generate_wayland_protocol_client_sources)
qt6_generate_wayland_protocol_client_sources(${ARGV})
endfunction()
endmacro()
endif()

View File

@ -66,7 +66,7 @@ function(qt6_generate_wayland_protocol_server_sources target)
endfunction()
if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
function(qt_generate_wayland_protocol_server_sources)
macro(qt_generate_wayland_protocol_server_sources)
qt6_generate_wayland_protocol_server_sources(${ARGV})
endfunction()
endmacro()
endif()