Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid results for parameterless signals with no return type #89

Open
zygny opened this issue Aug 13, 2019 · 1 comment
Open

Invalid results for parameterless signals with no return type #89

zygny opened this issue Aug 13, 2019 · 1 comment

Comments

@zygny
Copy link

zygny commented Aug 13, 2019

Starting out on my journey with DBus bindings so forgive me if I am doing something wrong/silly here...

Starting at the start: My goal is to generate a proxy object for Network Manager.

I can generate NetworkManager introspection XML with:
gdbus introspect --system --dest=org.freedesktop.NetworkManager --object-path=/org/freedesktop/NetworkManager --xml > generated/network_manager_introspect.xml

Then feed the XML into codegen:
gdbus-codegen-glibmm3 --generate-cpp-code=generated/network-manager generated/network_manager_introspect.xml --interface-prefix="org.freedesktop"

Firstly, this reproduces #77 as the sub-nodes are not populated in generated/network_manager_introspect.xml (stripping unnecessary detail):

...snip...

<node>
  <interface name="org.freedesktop.NetworkManager">

...snip...

  </interface>
  <node name="DnsManager"/>
  <node name="DHCP4Config"/>
  <node name="ActiveConnection"/>
  <node name="Devices"/>
  <node name="AgentManager"/>
  <node name="Settings"/>
  <node name="IP6Config"/>
  <node name="IP4Config"/>
</node>

Secondly, after deleting the sub-nodes, I tried feeding the modified XML into codegen again, it successfully generates the expected [cpp|h] files.
The 'CheckPermissions' signal: docs
that has no parameters and no return values is incorrectly generated in generated/network-manager_proxy.h:

class NetworkManager : public Glib::ObjectBase {
public:

...snip...

    sigc::signal<void,  > CheckPermissions_signal;

...snip...
@mardy
Copy link
Contributor

mardy commented Aug 19, 2019

@zygny Thanks for your bug report, it looks like we indeed never found a signal with no parameters. But the use-case is valid, so this muxt be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants