src/dbus/qdbusxmlgenerator.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
--- a/src/dbus/qdbusxmlgenerator.cpp	Fri Sep 17 08:34:18 2010 +0300
+++ b/src/dbus/qdbusxmlgenerator.cpp	Mon Oct 04 01:19:32 2010 +0300
@@ -133,7 +133,7 @@
         if (mm.methodType() == QMetaMethod::Signal)
             // adding a signal
             isSignal = true;
-        else if (mm.methodType() == QMetaMethod::Slot && mm.access() == QMetaMethod::Public)
+        else if (mm.access() == QMetaMethod::Public && (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method))
             isSignal = false;
         else
             continue;           // neither signal nor public slot
@@ -141,9 +141,9 @@
         if (isSignal && !(flags & (QDBusConnection::ExportScriptableSignals |
                                    QDBusConnection::ExportNonScriptableSignals)))
             continue;           // we're not exporting any signals
-        if (!isSignal && !(flags & (QDBusConnection::ExportScriptableSlots |
-                                    QDBusConnection::ExportNonScriptableSlots)))
-            continue;           // we're not exporting any slots
+        if (!isSignal && (!(flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) &&
+                          !(flags & (QDBusConnection::ExportScriptableInvokables | QDBusConnection::ExportNonScriptableInvokables))))
+            continue;           // we're not exporting any slots or invokables
 
         QString xml = QString::fromLatin1("    <%1 name=\"%2\">\n")
                       .arg(isSignal ? QLatin1String("signal") : QLatin1String("method"))