Commit f08ddefa authored by Robert Griebl's avatar Robert Griebl
Browse files

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: default avatarThiago Macieira <thiago.macieira@intel.com>
parent 0d679261
No related merge requests found
Showing with 6 additions and 0 deletions
......@@ -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);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment