qt5base-lts/src/dbus
Craig Scott fa9f13f130 Handle empty string args for versionless wrappers of dbus CMake commands
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>
2021-09-20 14:23:14 +10:00
..
doc Doc: Add version and description to Qt-DBus documentation 2021-09-17 17:54:09 +02:00
CMakeLists.txt Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00
dbus_minimal_p.h
LIBDBUS-1-LICENSE.txt
qdbus_symbols_p.h Fix passing QDBusUnixFileDescriptors over peer-to-peer connections 2020-07-13 20:45:20 +02:00
qdbus_symbols.cpp Another round of replacing 0 with nullptr 2020-10-07 23:02:47 +02:00
qdbusabstractadaptor_p.h Use QList instead of QVector in dbus 2020-06-25 22:31:13 +02:00
qdbusabstractadaptor.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusabstractadaptor.h
qdbusabstractinterface_p.h
qdbusabstractinterface.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusabstractinterface.h Remove some dead code 2020-09-12 23:36:50 +02:00
qdbusargument_p.h QDBusMarshaller: fix -Wformat-overflow 2021-07-08 01:49:26 +02:00
qdbusargument.cpp Deprecate QVariant::Type 2020-10-23 09:58:57 +02:00
qdbusargument.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusconnection_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusconnection.cpp Switch Q_DECL_DEPRECATED to use C++14 [[deprecated]] 2020-10-03 00:12:05 +02:00
qdbusconnection.h Switch Q_DECL_DEPRECATED to use C++14 [[deprecated]] 2020-10-03 00:12:05 +02:00
qdbusconnectioninterface.cpp
qdbusconnectioninterface.h
qdbusconnectionmanager_p.h MetaObject: Store the QMetaType of the methods 2020-06-02 22:42:15 +02:00
qdbuscontext_p.h
qdbuscontext.cpp Tidy nullptr usage 2019-12-06 12:13:20 +01:00
qdbuscontext.h
qdbusdemarshaller.cpp Deprecate QScopedPointer::take() 2020-11-20 14:28:31 +01:00
qdbuserror.cpp
qdbuserror.h Port some more /*implicit*/-like comments to Q_IMPLICIT 2020-10-16 01:07:31 +02:00
qdbusextratypes.cpp Port users of QDBusAbstractInterface::(async)callWithArgumentList() to new variadic (async)Call() 2019-08-07 20:09:17 +00:00
qdbusextratypes.h Remove dead code 2020-10-12 14:49:50 +02:00
qdbusintegrator_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusintegrator.cpp Use (new) erase()/erase_if() algorithms 2020-12-05 00:47:44 +01:00
qdbusinterface_p.h
qdbusinterface.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusinterface.h
qdbusinternalfilters.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusintrospection_p.h Use QList instead of QVector in dbus 2020-06-25 22:31:13 +02:00
qdbusintrospection.cpp
qdbusmarshaller.cpp QDBusMarshaller: fix -Wformat-overflow 2021-07-08 01:49:26 +02:00
qdbusmessage_p.h
qdbusmessage.cpp Get rid of some #ifdef qt6 2020-09-30 21:15:40 +02:00
qdbusmessage.h Get rid of some #ifdef qt6 2020-09-30 21:15:40 +02:00
qdbusmetaobject_p.h MetaObject: store the QMetaType of the properties 2020-02-25 15:43:15 +01:00
qdbusmetaobject.cpp qdbus: add support for "aay" (QByteArrayList) 2021-05-02 22:00:43 +02:00
qdbusmetatype_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusmetatype.cpp qdbuscpp2xml: add support for custom types with a new -t option 2021-08-25 01:03:54 +02:00
qdbusmetatype.h qdbuscpp2xml: add support for custom types with a new -t option 2021-08-25 01:03:54 +02:00
qdbusmisc.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbuspendingcall_p.h Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbuspendingcall.cpp Fix qdoc warnings in QtDBus 2020-10-21 07:31:26 +02:00
qdbuspendingcall.h
qdbuspendingreply.cpp Fix qdoc warnings in QtDBus 2020-10-21 07:31:26 +02:00
qdbuspendingreply.h Fix qdoc warnings in QtDBus 2020-10-21 07:31:26 +02:00
qdbusreply.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusreply.h Remove QVariant(int type, void *data, ...) constructor 2020-08-15 10:56:29 +02:00
qdbusserver.cpp Merge remote-tracking branch 'origin/5.13' into 5.14 2019-09-04 07:03:54 +02:00
qdbusserver.h
qdbusservicewatcher.cpp Port QDBusServiceWatcher::watchedServices to bindable properties 2021-04-28 16:59:53 +02:00
qdbusservicewatcher.h Port QDBusServiceWatcher::watchedServices to bindable properties 2021-04-28 16:59:53 +02:00
qdbusthreaddebug_p.h
qdbusunixfiledescriptor.cpp Tidy nullptr usage 2019-12-06 12:13:20 +01:00
qdbusunixfiledescriptor.h
qdbusutil_p.h Port dbus from QStringRef to QStringView 2020-06-15 10:44:10 +02:00
qdbusutil.cpp Use QMetaType instead of integer based type ids 2020-09-23 19:30:28 +02:00
qdbusvirtualobject.cpp
qdbusvirtualobject.h
qdbusxmlgenerator.cpp QDBus: fix ExportScriptableInvokables to allow calling scriptable invokables 2021-08-23 23:07:30 +02:00
qdbusxmlparser_p.h
qdbusxmlparser.cpp
Qt6DBusMacros.cmake Handle empty string args for versionless wrappers of dbus CMake commands 2021-09-20 14:23:14 +10:00
qt_attribution.json Record that we're still up to date with latest dbus 2020-03-16 08:52:10 +01:00
qtdbusglobal_p.h
qtdbusglobal.h Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00