diff options
author | Kevron Rees <kevron.m.rees@intel.com> | 2015-01-22 15:00:36 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-02-15 02:17:53 +0000 |
commit | 0eec8c86b604374c3210133822d41df229698b34 (patch) | |
tree | ef38b6a2def0b285aa35b57c52fbbe14263640a2 /src/dbus/qdbusintegrator.cpp | |
parent | 06ecd74db138bcdf6f87df5917f6d5035da41823 (diff) |
QDBusConnection::registorObject with interface
Currently QDBus relies on a key in QMetaClassInfo to understand the DBus interface name.
This patch allows QDBus to also use a specified interface name in the registerObject call
instead of relying on QMetaClassInfo that might not be there (if the QObject was created
in QML or Javascript for example).
Change-Id: Ie02b2c67e7deb07f43e35eb166c11833fcbf38f3
Task-number: QTBUG-44074
Reviewed-by: Kevron Rees <kevron.m.rees@intel.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index d819009d9b..a95d96e526 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1481,8 +1481,12 @@ void QDBusConnectionPrivate::activateObject(ObjectTreeNode &node, const QDBusMes if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots) || node.flags & (QDBusConnection::ExportScriptableInvokables|QDBusConnection::ExportNonScriptableInvokables)) { bool interfaceFound = true; - if (!msg.interface().isEmpty()) - interfaceFound = qDBusInterfaceInObject(node.obj, msg.interface()); + if (!msg.interface().isEmpty()) { + if (!node.interfaceName.isEmpty()) + interfaceFound = msg.interface() == node.interfaceName; + else + interfaceFound = qDBusInterfaceInObject(node.obj, msg.interface()); + } if (interfaceFound) { if (!activateCall(node.obj, node.flags, msg)) |