diff options
| author | Victor Tran <vicr12345@gmail.com> | 2019-01-16 00:35:20 +1100 |
|---|---|---|
| committer | Victor Tran <vicr12345@gmail.com> | 2019-01-16 00:35:20 +1100 |
| commit | e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434 (patch) | |
| tree | e01bae02de01a7f08a13a7e8ce4038a983e3d970 /installer/process/installworker.cpp | |
| parent | 8a5b13e73a1ade01eb4ecc5f32de0f18026c46a6 (diff) | |
| download | theInstaller-e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434.tar.gz theInstaller-e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434.tar.bz2 theInstaller-e9058c61e2c78f6e5e04c8e5aa3c44a1e0d02434.zip | |
Abort on download error
Diffstat (limited to 'installer/process/installworker.cpp')
| -rw-r--r-- | installer/process/installworker.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/installer/process/installworker.cpp b/installer/process/installworker.cpp index a297420..d4f5c5b 100644 --- a/installer/process/installworker.cpp +++ b/installer/process/installworker.cpp @@ -91,6 +91,10 @@ bool InstallWorker::startWork() { lastBytesReceived = 0; lastTimeUpdate = QDateTime::fromMSecsSinceEpoch(0); connect(reply, &QNetworkReply::finished, [=] { + if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != 200) { + QApplication::exit(1); + return; + } packageFile.flush(); packageFile.seek(0); |
