mirror of
https://github.com/QuasarApp/installer-framework.git
synced 2025-05-13 05:19:35 +00:00
fix a crash while testing a unresponsive server
Change-Id: I7fdc44a8ca822ea2145c9867a348f8462b894068 Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
This commit is contained in:
parent
a2920282e6
commit
77a40b5bc0
@ -126,8 +126,13 @@ void TestRepository::doStart()
|
|||||||
void TestRepository::doCancel()
|
void TestRepository::doCancel()
|
||||||
{
|
{
|
||||||
if (m_downloader) {
|
if (m_downloader) {
|
||||||
|
QString errorString = m_downloader->errorString();
|
||||||
|
if (errorString.isEmpty())
|
||||||
|
errorString = tr("Got a timeout while testing: '%1'").arg(m_repository.displayname());
|
||||||
|
// at the moment the download sends downloadCompleted() if we cancel it, so just
|
||||||
|
disconnect(m_downloader, 0, this, 0);
|
||||||
m_downloader->cancelDownload();
|
m_downloader->cancelDownload();
|
||||||
emitFinishedWithError(KDJob::Canceled, m_downloader->errorString());
|
emitFinishedWithError(KDJob::Canceled, errorString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user