fa9f13f130
CMake silently drops empty list items when passing ${someVar} to a function unquoted. The versionless wrapper functions typically use ${ARGV} or ${ARGN} to pass through arguments from the caller to the versioned implementation, but this doesn't preserve empty arguments. For qt_add_dbus_adaptor() in particular, this was problematic because that meant arguments after the empty arg effectively "moved left" and were interpreted as the wrong arguments. Use named arguments and pass through each one explicitly for the qt_add_dbus_adaptor(). This takes advantage of the implementation of the versioned function, which also checks each optional positional argument explicitly. We can only do this because we know the upper bound on the number of arguments, so it is possible to represent each argument with its own variable. A more general solution that didn't need to know the number of arguments would require the cmake_language(EVAL) command, but that requires CMake 3.18 or later. Fixes: QTBUG-96594 Pick-to: 6.2 Change-Id: Ibb1de19217191768ca5ead969b20a1d28c466868 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> |
||
---|---|---|
.. | ||
doc | ||
CMakeLists.txt | ||
dbus_minimal_p.h | ||
LIBDBUS-1-LICENSE.txt | ||
qdbus_symbols_p.h | ||
qdbus_symbols.cpp | ||
qdbusabstractadaptor_p.h | ||
qdbusabstractadaptor.cpp | ||
qdbusabstractadaptor.h | ||
qdbusabstractinterface_p.h | ||
qdbusabstractinterface.cpp | ||
qdbusabstractinterface.h | ||
qdbusargument_p.h | ||
qdbusargument.cpp | ||
qdbusargument.h | ||
qdbusconnection_p.h | ||
qdbusconnection.cpp | ||
qdbusconnection.h | ||
qdbusconnectioninterface.cpp | ||
qdbusconnectioninterface.h | ||
qdbusconnectionmanager_p.h | ||
qdbuscontext_p.h | ||
qdbuscontext.cpp | ||
qdbuscontext.h | ||
qdbusdemarshaller.cpp | ||
qdbuserror.cpp | ||
qdbuserror.h | ||
qdbusextratypes.cpp | ||
qdbusextratypes.h | ||
qdbusintegrator_p.h | ||
qdbusintegrator.cpp | ||
qdbusinterface_p.h | ||
qdbusinterface.cpp | ||
qdbusinterface.h | ||
qdbusinternalfilters.cpp | ||
qdbusintrospection_p.h | ||
qdbusintrospection.cpp | ||
qdbusmarshaller.cpp | ||
qdbusmessage_p.h | ||
qdbusmessage.cpp | ||
qdbusmessage.h | ||
qdbusmetaobject_p.h | ||
qdbusmetaobject.cpp | ||
qdbusmetatype_p.h | ||
qdbusmetatype.cpp | ||
qdbusmetatype.h | ||
qdbusmisc.cpp | ||
qdbuspendingcall_p.h | ||
qdbuspendingcall.cpp | ||
qdbuspendingcall.h | ||
qdbuspendingreply.cpp | ||
qdbuspendingreply.h | ||
qdbusreply.cpp | ||
qdbusreply.h | ||
qdbusserver.cpp | ||
qdbusserver.h | ||
qdbusservicewatcher.cpp | ||
qdbusservicewatcher.h | ||
qdbusthreaddebug_p.h | ||
qdbusunixfiledescriptor.cpp | ||
qdbusunixfiledescriptor.h | ||
qdbusutil_p.h | ||
qdbusutil.cpp | ||
qdbusvirtualobject.cpp | ||
qdbusvirtualobject.h | ||
qdbusxmlgenerator.cpp | ||
qdbusxmlparser_p.h | ||
qdbusxmlparser.cpp | ||
Qt6DBusMacros.cmake | ||
qt_attribution.json | ||
qtdbusglobal_p.h | ||
qtdbusglobal.h |