diff options
author | Craig Scott <craig.scott@qt.io> | 2021-09-01 14:35:15 +1000 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-01 07:58:58 +0000 |
commit | 1f1f981be46fd9050699280665fcfac189f8fea2 (patch) | |
tree | 4002b31ca4403d024942ab8ca4f2eaa8a960d9f8 | |
parent | c82b4ce352dc629b718c0197b3d349cae22283d1 (diff) | |
download | qtwayland-1f1f981be46fd9050699280665fcfac189f8fea2.tar.gz |
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: I293999c8054c2572e9145974a9ffac661f70bf35
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 1998283f61e76928063dd46d7dfc0d2759d02855)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/client/Qt6WaylandClientMacros.cmake | 4 | ||||
-rw-r--r-- | src/compositor/Qt6WaylandCompositorMacros.cmake | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/Qt6WaylandClientMacros.cmake b/src/client/Qt6WaylandClientMacros.cmake index 879841a0..0834e880 100644 --- a/src/client/Qt6WaylandClientMacros.cmake +++ b/src/client/Qt6WaylandClientMacros.cmake @@ -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() diff --git a/src/compositor/Qt6WaylandCompositorMacros.cmake b/src/compositor/Qt6WaylandCompositorMacros.cmake index a9e79ce4..0522f658 100644 --- a/src/compositor/Qt6WaylandCompositorMacros.cmake +++ b/src/compositor/Qt6WaylandCompositorMacros.cmake @@ -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() |