summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2024-03-13 11:45:05 +0200
committerKatja Marttila <katja.marttila@qt.io>2024-03-14 09:01:09 +0200
commitce47a87dcfaaf59da8f6a927468b00dcb43d1ae4 (patch)
tree22b0180ab57eb391c3d813fb7e50c3099968b754 /src
parentf7f14309fe27faad080e31b77e72dadd32c9b6e0 (diff)
Add detailed warning when hash verification fails
Added expected and calculated hash values to warning Change-Id: I2646b139c756ba7903fe2a05bab39b7c9cbbe62a Reviewed-by: Arttu Tarkiainen <arttu.tarkiainen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index fcad22cfa..feb7d66da 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -292,11 +292,13 @@ void DownloadArchivesJob::registerFile()
const QMessageBox::Button res =
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
QLatin1String("DownloadError"), tr("Download Error"), tr("Hash verification while "
- "downloading failed. This is a temporary error, please retry."),
+ "downloading failed. This is a temporary error, please retry.\n\n"
+ "Expected: %1 \nDownloaded: %2").arg(QString::fromLatin1(m_currentHash), QString::fromLatin1(m_downloader->sha1Sum().toHex())),
QMessageBox::Retry | QMessageBox::Cancel, QMessageBox::Retry);
if (res == QMessageBox::Cancel) {
- finishWithError(tr("Cannot verify Hash"));
+ finishWithError(tr("Cannot verify Hash\nExpected: %1 \nDownloaded: %2")
+ .arg(QString::fromLatin1(m_currentHash), QString::fromLatin1(m_downloader->sha1Sum().toHex())));
return;
}
// When using command line instance, only retry a number of times to avoid