Commit f5aa65ba authored by Wouter's avatar Wouter

Keep original names or RPC Methods

Required when doing the call, rather than the mangled name
parent f079ea69
......@@ -590,7 +590,7 @@ RpcMethod* Introspector::introspectMethod(const QString& id, const QVariantMap&
return 0;
}
RpcMethod *method = new RpcMethod(makeIdentifier(id), containerClass);
RpcMethod *method = new RpcMethod(makeIdentifier(id), id, containerClass);
if (data.contains("description")) {
method->setDocumentation(data.value("description").toString());
}
......
......@@ -22,12 +22,17 @@
using namespace QJsonIntrospect;
RpcMethod::RpcMethod(const QString& name, QJsonIntrospect::Class* parent)
: Method(name, parent)
: Method(name, "void", Type::PublicSlot, parent)
{
}
RpcMethod::RpcMethod(const QString& name, Type::ProtectionLevel protectionLevel, Class* parent)
: Method(name, "void", protectionLevel, parent)
RpcMethod::RpcMethod(const QString& name, const QString &originalName, QJsonIntrospect::Class* parent)
: Method(name, "void", Type::PublicSlot, originalName, parent)
{
}
RpcMethod::RpcMethod(const QString& name, Type::ProtectionLevel protectionLevel, const QString &originalName, Class* parent)
: Method(name, "void", protectionLevel, originalName, parent)
{
}
......
......@@ -34,7 +34,8 @@ class RpcMethod : public QJsonIntrospect::Method
public:
RpcMethod(const QString& name, QJsonIntrospect::Class* parent);
RpcMethod(const QString& name, QJsonIntrospect::Type::ProtectionLevel protectionLevel, QJsonIntrospect::Class* parent);
RpcMethod(const QString& name, const QString &originalName, QJsonIntrospect::Class* parent);
RpcMethod(const QString& name, QJsonIntrospect::Type::ProtectionLevel protectionLevel, const QString &originalName, QJsonIntrospect::Class* parent);
virtual ~RpcMethod();
......
......@@ -61,7 +61,7 @@
{% case "array" %}
QVariantList {{param.name}}Variant;
Q_FOREACH(const {{param.type.type.itemType.signature}}& {{param.name}}Item, {{param.name}}) {
{{param.name}}Variant << {{param.name}}Item;
{{param.name}}Variant << {{param.name}}Item;
}
_rpcParameters.insert("{{ param.name }}", {{param.name}}Variant);
{% case "type" %}
......@@ -71,7 +71,7 @@
{% endswitch %}
{% endfor %}
doCall("{{ member.name }}", _rpcParameters);
doCall("{{ member.originalName }}", _rpcParameters);
}
{% endif %}{% endif %}{# inline, pureVirtual #}
......
Markdown is supported
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