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>bb10
parent
0d67926117
commit
f08ddefac7
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue