Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] [cpp-qt-client] Download Progress #18926

Closed
Jazzco opened this issue Jun 14, 2024 · 3 comments
Closed

[REQ] [cpp-qt-client] Download Progress #18926

Jazzco opened this issue Jun 14, 2024 · 3 comments

Comments

@Jazzco
Copy link
Contributor

Jazzco commented Jun 14, 2024

Is your feature request related to a problem? Please describe.

When downloading larger files via the generated API I miss a possibility to get the download progress. This could be achieved by connecting to the signal QNetworkReply::downloadProgress.

Describe the solution you'd like

I see two possible ways:

  1. pass the QNetworkReply::downloadProgress to the clients
    • add a downloadProgress signal to the HttpRequest header
    • connect the QNetworkReply::downloadProgress to the new signal in the HttpRequest body right before the connect to QNetworkReply::finished
    • add a downloadProgress signal to the api-header and connect this in the api-body right before the connect to HttpRequestWorker::on_execution_finished
  2. OR make the QNetworkReply available
    • add a parameter to a changeable reference pointer to the HttpRequest::execute that can be read in the client's major call (the first occurrence of nickname)

Solution 2 would make more interaction with the reply available but may also enable misusing it.

Describe alternatives you've considered

Additional context

@Jazzco
Copy link
Contributor Author

Jazzco commented Jun 14, 2024

Here is an implementation of solution 1: https://github.com/Jazzco/openapi-generator/tree/qt-progress-info
On positive feedback I would create a PullRequest

@wing328
Copy link
Member

wing328 commented Jun 17, 2024

can you please create a PR to start with? I'll tag some contributors to review. thanks

@Jazzco
Copy link
Contributor Author

Jazzco commented Jun 17, 2024

Sure: #18950

@wing328 wing328 closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants