dbusxml2qt3 with multiple interfaces #23

Closed
opened 4 years ago by deloptes · 1 comments
Collaborator

Basic information

  • TDE version: R14.1.0
  • Distribution: Debian Buster
  • Hardware: amd64

Description

When generating code from a xml with multiple interfaces in one node it fails to build because same variable is initialized multiple times.

For example:

TQDomElement interfaceElement = doc.createElement("interface");
    org::bluez::obex::AgentManager1Interface::buildIntrospectionData(interfaceElement);
    nodeElement.appendChild(interfaceElement);

TQDomElement interfaceElement = doc.createElement("interface");
    org::bluez::obex::Client1Interface::buildIntrospectionData(interfaceElement);
    nodeElement.appendChild(interfaceElement);

Looking at KDE they have only one interface per file. While I was thinking it is legitim to have more than one (at least looking at the specification for example obex).

IMO it needs a small change to make it work. I'll propose and you decide what to do with it.

Steps to reproduce

  1. xml interface definition with multiple interfaces
  2. dbusxml2qt3 with no arguments

Screenshots

<!-- This is a comment. Please fill in the required fields below. The comments provide instructions on how to do so. Note: You do not need to remove comments. --> ## Basic information - TDE version: R14.1.0 - Distribution: Debian Buster - Hardware: amd64 <!-- Use SL/* labels to set the severity level. Please do not set a milestone. --> ## Description When generating code from a xml with multiple interfaces in one node it fails to build because same variable is initialized multiple times. For example: ``` TQDomElement interfaceElement = doc.createElement("interface"); org::bluez::obex::AgentManager1Interface::buildIntrospectionData(interfaceElement); nodeElement.appendChild(interfaceElement); TQDomElement interfaceElement = doc.createElement("interface"); org::bluez::obex::Client1Interface::buildIntrospectionData(interfaceElement); nodeElement.appendChild(interfaceElement); ``` Looking at [KDE](https://github.com/KDE/bluez-qt/tree/master/src/interfaces) they have only one interface per file. While I was thinking it is legitim to have more than one (at least looking at the specification for example [obex](https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/obex-api.txt)). IMO it needs a small change to make it work. I'll propose and you decide what to do with it. ## Steps to reproduce 1. xml interface definition with multiple interfaces 2. dbusxml2qt3 with no arguments ## Screenshots <!-- If it seems useful, please provide provide one or more screenshots. -->
MicheleC closed this issue 4 years ago
Owner

Solved by PR #24.

Solved by PR #24.
MicheleC added this to the R14.1.0 release milestone 4 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/dbus-1-tqt#23
Loading…
There is no content yet.