QNetworkManagerSettings: port DBus calls from callWithArgumentList() to call()
With the new variadic QDBusAbstractInterface::call() API, this saves ~5KiB in text size on optimized GCC 6.1 Linux AMD64 builds. Change-Id: Idc43bb07083f98b4b652d7331e545ba79be1e296 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
35431062bd
commit
ed02ab78ea
@ -72,11 +72,9 @@ QNetworkManagerInterface::QNetworkManagerInterface(QObject *parent)
|
|||||||
QLatin1String(NM_DBUS_PATH),
|
QLatin1String(NM_DBUS_PATH),
|
||||||
DBUS_PROPERTIES_INTERFACE,
|
DBUS_PROPERTIES_INTERFACE,
|
||||||
QDBusConnection::systemBus());
|
QDBusConnection::systemBus());
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << QLatin1String(NM_DBUS_INTERFACE);
|
|
||||||
QDBusPendingReply<QVariantMap> propsReply
|
QDBusPendingReply<QVariantMap> propsReply
|
||||||
= managerPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"),
|
= managerPropertiesInterface.call(QDBus::Block, QLatin1String("GetAll"), QLatin1String(NM_DBUS_INTERFACE));
|
||||||
argumentList);
|
|
||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
} else {
|
} else {
|
||||||
@ -344,11 +342,8 @@ QNetworkManagerInterfaceDevice::QNetworkManagerInterfaceDevice(const QString &de
|
|||||||
DBUS_PROPERTIES_INTERFACE,
|
DBUS_PROPERTIES_INTERFACE,
|
||||||
QDBusConnection::systemBus(),parent);
|
QDBusConnection::systemBus(),parent);
|
||||||
|
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE);
|
|
||||||
QDBusPendingReply<QVariantMap> propsReply
|
QDBusPendingReply<QVariantMap> propsReply
|
||||||
= devicePropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"),
|
= devicePropertiesInterface.call(QDBus::Block, QLatin1String("GetAll"), QLatin1String(NM_DBUS_INTERFACE_DEVICE));
|
||||||
argumentList);
|
|
||||||
|
|
||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
@ -446,11 +441,8 @@ QNetworkManagerInterfaceDeviceWired::QNetworkManagerInterfaceDeviceWired(const Q
|
|||||||
DBUS_PROPERTIES_INTERFACE,
|
DBUS_PROPERTIES_INTERFACE,
|
||||||
QDBusConnection::systemBus(),parent);
|
QDBusConnection::systemBus(),parent);
|
||||||
|
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED);
|
|
||||||
QDBusPendingReply<QVariantMap> propsReply
|
QDBusPendingReply<QVariantMap> propsReply
|
||||||
= deviceWiredPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"),
|
= deviceWiredPropertiesInterface.call(QDBus::Block, QLatin1String("GetAll"), QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRED));
|
||||||
argumentList);
|
|
||||||
|
|
||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
@ -543,11 +535,9 @@ QNetworkManagerInterfaceDeviceWireless::QNetworkManagerInterfaceDeviceWireless(c
|
|||||||
DBUS_PROPERTIES_INTERFACE,
|
DBUS_PROPERTIES_INTERFACE,
|
||||||
QDBusConnection::systemBus(),parent);
|
QDBusConnection::systemBus(),parent);
|
||||||
|
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS);
|
|
||||||
QDBusPendingReply<QVariantMap> propsReply
|
QDBusPendingReply<QVariantMap> propsReply
|
||||||
= deviceWirelessPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"),
|
= deviceWirelessPropertiesInterface.call(QDBus::Block, QLatin1String("GetAll"), QLatin1String(NM_DBUS_INTERFACE_DEVICE_WIRELESS));
|
||||||
argumentList);
|
|
||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
}
|
}
|
||||||
@ -647,11 +637,9 @@ QNetworkManagerInterfaceDeviceModem::QNetworkManagerInterfaceDeviceModem(const Q
|
|||||||
QLatin1String("org.freedesktop.DBus.Properties"),
|
QLatin1String("org.freedesktop.DBus.Properties"),
|
||||||
QDBusConnection::systemBus(),parent);
|
QDBusConnection::systemBus(),parent);
|
||||||
|
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << QLatin1String(NM_DBUS_INTERFACE_DEVICE_MODEM);
|
|
||||||
QDBusPendingReply<QVariantMap> propsReply
|
QDBusPendingReply<QVariantMap> propsReply
|
||||||
= deviceModemPropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"),
|
= deviceModemPropertiesInterface.call(QDBus::Block, QLatin1String("GetAll"), QLatin1String(NM_DBUS_INTERFACE_DEVICE_MODEM));
|
||||||
argumentList);
|
|
||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
}
|
}
|
||||||
@ -746,9 +734,7 @@ QList <QDBusObjectPath> QNetworkManagerSettings::listConnections()
|
|||||||
|
|
||||||
QString QNetworkManagerSettings::getConnectionByUuid(const QString &uuid)
|
QString QNetworkManagerSettings::getConnectionByUuid(const QString &uuid)
|
||||||
{
|
{
|
||||||
QList<QVariant> argumentList;
|
QDBusReply<QDBusObjectPath > reply = call(QDBus::Block, QLatin1String("GetConnectionByUuid"), uuid);
|
||||||
argumentList << QVariant::fromValue(uuid);
|
|
||||||
QDBusReply<QDBusObjectPath > reply = callWithArgumentList(QDBus::Block,QLatin1String("GetConnectionByUuid"), argumentList);
|
|
||||||
return reply.value().path();
|
return reply.value().path();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -917,11 +903,8 @@ QNetworkManagerConnectionActive::QNetworkManagerConnectionActive(const QString &
|
|||||||
QDBusConnection::systemBus());
|
QDBusConnection::systemBus());
|
||||||
|
|
||||||
|
|
||||||
QList<QVariant> argumentList;
|
|
||||||
argumentList << QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION);
|
|
||||||
QDBusPendingReply<QVariantMap> propsReply
|
QDBusPendingReply<QVariantMap> propsReply
|
||||||
= connectionActivePropertiesInterface.callWithArgumentList(QDBus::Block,QLatin1String("GetAll"),
|
= connectionActivePropertiesInterface.call(QDBus::Block, QLatin1String("GetAll"), QLatin1String(NM_DBUS_INTERFACE_ACTIVE_CONNECTION));
|
||||||
argumentList);
|
|
||||||
|
|
||||||
if (!propsReply.isError()) {
|
if (!propsReply.isError()) {
|
||||||
propertyMap = propsReply.value();
|
propertyMap = propsReply.value();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user