Commit b4715ea9 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇 Committed by Elvis Angelaccio
Browse files

Report processed size during get operation

Otherwise the job dialog is just showing an indeterminate progress bar
until the file has been fetched entirely.
parent dfe09252
Pipeline #238942 passed with stage
in 38 seconds
......@@ -988,12 +988,17 @@ void KIOGDrive::get(const QUrl &url)
mimeType(file->mimeType());
FileFetchContentJob contentJob(downloadUrl, getAccount(accountId));
QObject::connect(&contentJob, &KGAPI2::Job::progress, [this](KGAPI2::Job *, int processed, int total) {
processedSize(processed);
totalSize(total);
});
if (!runJob(contentJob, url, accountId)) {
return;
}
QByteArray contentData = contentJob.data();
processedSize(contentData.size());
totalSize(contentData.size());
// data() has a maximum transfer size of 14 MiB so we need to send it in chunks.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment