Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.13.1
-
None
Description
We'd like the ability to define callbacks in our QFace interfaces; so something like this:
interface Callback { void onError(int error); } interface Service { /** Returns a subscription ID. */ int subscribe(int name, Callback errorCallback); }
This does not work. Our fallback solution of returning an enum with negative values also does not work, as the generator creates unsigned enum values. Our final fallback solution of using a signal adds the problem of referencing a subscription that does not have an ID yet, so we will not know which subscription attempt the error is reported on.
The only option we have left is change the generator templates to not produce unsigned values, but for other enums we might actually need high unsigned values, so it would bite us there.
So please provide a way to define callbacks, or perhaps add the option to return something like a QIviPendingReply.
Attachments
Issue Links
- relates to
-
QTBUG-99088 Provide a documentation about the API which gets generated by ivigenerator
- Reported