winvfs: Better error reporting

- fix download and validation error reporting
- add tests
This commit is contained in:
Christian Kamm 2018-11-09 12:17:24 +01:00 committed by Kevin Ottens
parent 0f2ef42ba2
commit 1ed005aafe
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2
2 changed files with 4 additions and 4 deletions

View file

@ -77,7 +77,7 @@ GETFileJob::GETFileJob(AccountPtr account, const QString &path, QIODevice *devic
, _headers(headers)
, _expectedEtagForResume(expectedEtagForResume)
, _expectedContentLength(-1)
, _contentLength(0)
, _contentLength(-1)
, _resumeStart(resumeStart)
, _errorStatus(SyncFileItem::NoStatus)
, _bandwidthLimited(false)
@ -98,7 +98,7 @@ GETFileJob::GETFileJob(AccountPtr account, const QUrl &url, QIODevice *device,
, _headers(headers)
, _expectedEtagForResume(expectedEtagForResume)
, _expectedContentLength(-1)
, _contentLength(0)
, _contentLength(-1)
, _resumeStart(resumeStart)
, _errorStatus(SyncFileItem::NoStatus)
, _directDownloadUrl(url)

View file

@ -35,7 +35,7 @@ class GETFileJob : public AbstractNetworkJob
QString _errorString;
QByteArray _expectedEtagForResume;
qint64 _expectedContentLength;
quint64 _contentLength;
qint64 _contentLength;
quint64 _resumeStart;
SyncFileItem::Status _errorStatus;
QUrl _directDownloadUrl;
@ -103,7 +103,7 @@ public:
quint64 resumeStart() { return _resumeStart; }
time_t lastModified() { return _lastModified; }
quint64 contentLength() const { return _contentLength; }
qint64 contentLength() const { return _contentLength; }
qint64 expectedContentLength() const { return _expectedContentLength; }
void setExpectedContentLength(qint64 size) { _expectedContentLength = size; }