D9028: [UDisks DeviceBackend] Slightly optimize

Aleix Pol Gonzalez noreply at phabricator.kde.org
Tue Nov 28 11:26:27 UTC 2017


apol added inline comments.

INLINE COMMENTS

> udisksdevicebackend.cpp:67
>      if (m_device->isValid()) {
> -        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
> -                                             SLOT(slotPropertiesChanged(QString,QVariantMap,QStringList)));
> -        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesAdded",
> -                                             this, SLOT(slotInterfacesAdded(QDBusObjectPath,VariantMapMap)));
> -        QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, UD2_DBUS_PATH, DBUS_INTERFACE_MANAGER, "InterfacesRemoved",
> -                                             this, SLOT(slotInterfacesRemoved(QDBusObjectPath,QStringList)));
> +        QTimer::singleShot(0, this, [this] {
> +            QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi, DBUS_INTERFACE_PROPS, "PropertiesChanged", this,

What do we gain by delaying dbus connection?

REPOSITORY
  R245 Solid

REVISION DETAIL
  https://phabricator.kde.org/D9028

To: broulik, #frameworks, davidedmundson
Cc: apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171128/e3bd6637/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list