summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-30 18:50:32 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-02 09:43:25 (GMT)
commit11ef1b9bae383c46f7893db0d26c99d354642609 (patch)
treeb86f5fb5a09a21f11149e62c4e8bd04c6705ea0e /src/dbus/qdbusintegrator.cpp
parent353dacb5e4c45e860ae8be228df9647c5a71093e (diff)
downloadQt-11ef1b9bae383c46f7893db0d26c99d354642609.zip
Qt-11ef1b9bae383c46f7893db0d26c99d354642609.tar.gz
Qt-11ef1b9bae383c46f7893db0d26c99d354642609.tar.bz2
Add a function to check if an interface is implemented by an object.
Also reorganise a bit, moving the function to create the interface name from an object's class name to qdbusmisc.cpp too. Reviewed-By: Trust Me
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r--src/dbus/qdbusintegrator.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 0578bf1..76179c9 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1359,12 +1359,8 @@ void QDBusConnectionPrivate::activateObject(ObjectTreeNode &node, const QDBusMes
// try the object itself:
if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots)) {
bool interfaceFound = true;
- if (!msg.interface().isEmpty()) {
- // check if the interface name matches anything in the class hierarchy
- const QMetaObject *mo = node.obj->metaObject();
- for ( ; !interfaceFound && mo != &QObject::staticMetaObject; mo = mo->superClass())
- interfaceFound = msg.interface() == qDBusInterfaceFromMetaObject(mo);
- }
+ if (!msg.interface().isEmpty())
+ interfaceFound = qDBusInterfaceInObject(node.obj, msg.interface());
if (interfaceFound) {
if (!activateCall(node.obj, node.flags, msg))