summaryrefslogtreecommitdiff
path: root/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2014-11-03 15:52:04 +0100
committerRobert Griebl <robert.griebl@pelagicore.com>2014-11-04 10:32:23 +0100
commitf08ddefac7d4495c28370c84bf9b383d6cf3abd1 (patch)
tree7375bb49fb7f98e4b985dec54328a1d2b81f29cb /src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
parent0d679261176aadb3dd8efdc8e130bcbe6f3ce6f3 (diff)
downloadqtbase-f08ddefac7d4495c28370c84bf9b383d6cf3abd1.tar.gz
Check the Q_SCRIPTABLE tag of signals and slots as early as possible.
This makes is possible to generate a valid D-Bus XML from a class that has e.g. internal slots with pointer parameters by explicitly marking all D-Bus exports with Q_SCRIPTABLE and running qdbuscpp2xml with the '-a' switch. Change-Id: Iab32a0a7f46f2516f6385808bbf35b26c7708b1a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp')
-rw-r--r--src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
index ea24c35a07..dc735df297 100644
--- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
+++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp
@@ -243,6 +243,8 @@ static QString generateInterfaceXml(const ClassDef *mo)
foreach (const FunctionDef &mm, mo->signalList) {
if (mm.wasCloned)
continue;
+ if (!mm.isScriptable && !(flags & QDBusConnection::ExportNonScriptableSignals))
+ continue;
retval += addFunction(mm, true);
}
@@ -250,10 +252,14 @@ static QString generateInterfaceXml(const ClassDef *mo)
if (flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) {
foreach (const FunctionDef &slot, mo->slotList) {
+ if (!slot.isScriptable && !(flags & QDBusConnection::ExportNonScriptableSlots))
+ continue;
if (slot.access == FunctionDef::Public)
retval += addFunction(slot);
}
foreach (const FunctionDef &method, mo->methodList) {
+ if (!method.isScriptable && !(flags & QDBusConnection::ExportNonScriptableSlots))
+ continue;
if (method.access == FunctionDef::Public)
retval += addFunction(method);
}