Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99087

QFace interfaces cannot use interfaces as parameters

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.13.1
    • Qt Interface Framework
    • None

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            gagi Dominik Holland
            developer1 TomTom Developers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes