-
-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
When generating Java code with InterfaceCodeGenerator version 5.2.0 on the https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.GlobalShortcuts.xml file, the following signal produces incorrect code:
<signal name="ShortcutsChanged">
<arg type="o" name="session_handle" direction="out"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QList<QPair<QString,QVariantMap>>"/>
<arg type="a(sa{sv})" name="shortcuts" direction="out"/>
</signal>Problematic generated code:
public static class ShortcutsChanged extends DBusSignal {
private final DBusPath sessionHandle;
private final List<org.freedesktop.dbus.Struct<String>, Map<String, Variant<?>>> shortcuts;
public ShortcutsChanged(String path, DBusPath sessionHandle, List<org.freedesktop.dbus.Struct<String>, Map<String, Variant<?>>> shortcuts) throws DBusException {
super(path, sessionHandle, shortcuts); this.sessionHandle = sessionHandle;
this.shortcuts = shortcuts;
}
public DBusPath getSessionHandle() {
return sessionHandle;
}
public List<org.freedesktop.dbus.Struct<String>, Map<String, Variant<?>>> getShortcuts() {
return shortcuts;
}
}Build error:
Execution failed for task ':sdk:compileJava'.
> Compilation failed; see the compiler output below.
/[redacted]/stargate/sdk/src/main/generated/org/freedesktop/portal/GlobalShortcuts.java:98: error: type Struct does not take parameters
private final List<org.freedesktop.dbus.Struct<String>, Map<String, Variant<?>>> shortcuts;
^
I believe the same type of error happens with https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.Usb.xml in DeviceEvents.
The exact setup can be seen here (Stargate is a Kotlin library that provides JVM applications with access to XDG Desktop Portals on Linux).
I've seen other generation errors with other XDG Portals related XML files. Opening separate tickets for easier tracking. Related: #302 and #303.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels