Linux: improve progess indication

Report data actually written to device instead of to cache.
This commit is contained in:
Floris Bos 2020-05-23 22:22:32 +02:00
parent b08ed20e5f
commit 3248f9f04b
2 changed files with 28 additions and 3 deletions

View file

@ -138,6 +138,7 @@ protected:
int _authopen(const QByteArray &filename);
bool _openAndPrepareDevice();
void _writeCache(const char *buf, size_t len);
qint64 _sectorsWritten();
/*
* libcurl callbacks
@ -153,6 +154,7 @@ protected:
CURL *_c;
curl_off_t _startOffset;
std::atomic<std::uint64_t> _lastDlTotal, _lastDlNow, _verifyTotal, _lastVerifyNow, _bytesWritten;
qint64 _sectorsStart;
QByteArray _url, _useragent, _buf, _filename, _lastError, _expectedHash;
char *_firstBlock;
size_t _firstBlockSize;