Skip to content

[REQ][Qt5] Make response objects queueable #3063

@luStopai

Description

@luStopai

Is your feature request related to a problem?

No, it's an improvement

Please describe.

I think it would be great if we could run requests in a QThread, but right now it's not possible because the returned objects cannot be queueable (signals&slots) from one thread to a different thread.
This is in order to be able to run requests in background without freezing the UI.

Describe the solution you'd like

I think if the response objects where pointers to qobjects instead of regular objects it should work. Notice that they should be registered with qRegisterMetaType() ( https://doc.qt.io/qt-5/qt.html#ConnectionType-enum )

Describe alternatives you've considered

Right now the alternative is to manually create a proxy class that makes use of the generated client to make the request, receive the response and then convert the response objects to some pointers to custom qobjects, which are queueable. So the purpose of this suggestion is to avoid this workaround

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions