diff options
author | Craig Scott <craig.scott@qt.io> | 2021-08-31 15:56:00 +1000 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-09-06 23:56:28 +1000 |
commit | a37789e4931a85fce4fba9c9612ebb4020572d54 (patch) | |
tree | a840bb5eb7bfedf95b6767ec01d4f50079be4e7f /src/dbus | |
parent | 9877d55a50db45f7c629f2172dd848ef07e9fabe (diff) | |
download | qtbase-a37789e4931a85fce4fba9c9612ebb4020572d54.tar.gz |
Revert "Ensure versionless wrappers do not introduce a new variable scope"
This reverts commit 08180e76e6116f0ef66476ca00b2b676b3aa50da.
Macros add another level of escaping that functions do not. The
conversion of the versionless wrappers to macros may alter the
behavior, so revert that change.
Task-number: QTBUG-96219
Pick-to: 6.2
Change-Id: Ic5dcff3081123d957888584ba1d76ae0580d9083
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/dbus')
-rw-r--r-- | src/dbus/Qt6DBusMacros.cmake | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/dbus/Qt6DBusMacros.cmake b/src/dbus/Qt6DBusMacros.cmake index 4f5373437a..e4e8635dff 100644 --- a/src/dbus/Qt6DBusMacros.cmake +++ b/src/dbus/Qt6DBusMacros.cmake @@ -76,13 +76,14 @@ function(qt6_add_dbus_interface _sources _interface _basename) endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - macro(qt_add_dbus_interface) + function(qt_add_dbus_interface sources) if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_add_dbus_interface(${ARGV}) + qt5_add_dbus_interface("${sources}" ${ARGN}) elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_add_dbus_interface(${ARGV}) + qt6_add_dbus_interface("${sources}" ${ARGN}) endif() - endmacro() + set("${sources}" "${${sources}}" PARENT_SCOPE) + endfunction() endif() @@ -99,13 +100,14 @@ function(qt6_add_dbus_interfaces _sources) endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - macro(qt_add_dbus_interfaces) + function(qt_add_dbus_interfaces sources) if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_add_dbus_interfaces(${ARGV}) + qt5_add_dbus_interfaces("${sources}" ${ARGN}) elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_add_dbus_interfaces(${ARGV}) + qt6_add_dbus_interfaces("${sources}" ${ARGN}) endif() - endmacro() + set("${sources}" "${${sources}}" PARENT_SCOPE) + endfunction() endif() @@ -143,13 +145,13 @@ function(qt6_generate_dbus_interface _header) # _customName OPTIONS -some -optio endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - macro(qt_generate_dbus_interface) + function(qt_generate_dbus_interface) if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) qt5_generate_dbus_interface(${ARGV}) elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) qt6_generate_dbus_interface(${ARGV}) endif() - endmacro() + endfunction() endif() @@ -201,11 +203,12 @@ function(qt6_add_dbus_adaptor _sources _xml_file _include) # _optionalParentClas endfunction() if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS) - macro(qt_add_dbus_adaptor) + function(qt_add_dbus_adaptor sources) if(QT_DEFAULT_MAJOR_VERSION EQUAL 5) - qt5_add_dbus_adaptor(${ARGV}) + qt5_add_dbus_adaptor("${sources}" ${ARGN}) elseif(QT_DEFAULT_MAJOR_VERSION EQUAL 6) - qt6_add_dbus_adaptor(${ARGV}) + qt6_add_dbus_adaptor("${sources}" ${ARGN}) endif() - endmacro() + set("${sources}" "${${sources}}" PARENT_SCOPE) + endfunction() endif() |