4
0
mirror of https://github.com/QuasarApp/installer-framework.git synced 2025-05-10 03:59:32 +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:
Tim Jenssen 2013-06-07 12:30:01 +02:00
parent a2920282e6
commit 77a40b5bc0

@ -126,8 +126,13 @@ void TestRepository::doStart()
void TestRepository::doCancel()
{
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();
emitFinishedWithError(KDJob::Canceled, m_downloader->errorString());
emitFinishedWithError(KDJob::Canceled, errorString);
}
}