diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-03 10:53:57 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-03 10:53:57 (GMT) |
commit | d5491ecdde14659a913c9f476f18c45f1d9489bb (patch) | |
tree | 06cc52249feda9bd9e50ca47abb8ebd676c8a309 /src/dbus/qdbusintegrator.cpp | |
parent | 42cdfaf86d34afeb6448723839fef70fe477deed (diff) | |
parent | a41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff) | |
download | Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.zip Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.gz Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts:
configure
Diffstat (limited to 'src/dbus/qdbusintegrator.cpp')
-rw-r--r-- | src/dbus/qdbusintegrator.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index efa6744..7951177 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -508,7 +508,7 @@ static bool shouldWatchService(const QString &service) return !service.isEmpty() && !service.startsWith(QLatin1Char(':')); } -extern QDBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook); +extern Q_DBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook); void qDBusAddSpyHook(QDBusSpyHook hook) { qDBusSpyHookList()->append(hook); @@ -618,7 +618,7 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags, continue; // check type: - if (mm.methodType() != QMetaMethod::Slot) + if (mm.methodType() != QMetaMethod::Slot && mm.methodType() != QMetaMethod::Method) continue; // check name: @@ -682,10 +682,17 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags, if (isAsync && metaTypes.count() > i + 1) continue; - if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0) - continue; // not exported - if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0) - continue; // not exported + if (mm.methodType() == QMetaMethod::Slot) { + if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0) + continue; // scriptable slots not exported + if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0) + continue; // non-scriptable slots not exported + } else { + if (isScriptable && (flags & QDBusConnection::ExportScriptableInvokables) == 0) + continue; // scriptable invokables not exported + if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableInvokables) == 0) + continue; // non-scriptable invokables not exported + } // if we got here, this slot matched return idx; @@ -1379,7 +1386,8 @@ void QDBusConnectionPrivate::activateObject(ObjectTreeNode &node, const QDBusMes return; // internal filters have already run or an error has been sent // try the object itself: - if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots)) { + 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()); |