GH-849 Further NetJob related fixes
This commit is contained in:
@ -159,11 +159,10 @@ void DownloadTask::fileDownloadFinished()
|
||||
emitSucceeded();
|
||||
}
|
||||
|
||||
void DownloadTask::fileDownloadFailed()
|
||||
void DownloadTask::fileDownloadFailed(QString reason)
|
||||
{
|
||||
// TODO: Give more info about the failure.
|
||||
qCritical() << "Failed to download update files.";
|
||||
emitFailed(tr("Failed to download update files."));
|
||||
qCritical() << "Failed to download update files:" << reason;
|
||||
emitFailed(tr("Failed to download update files: %1").arg(reason));
|
||||
}
|
||||
|
||||
void DownloadTask::fileDownloadProgressChanged(qint64 current, qint64 total)
|
||||
|
@ -78,7 +78,7 @@ protected slots:
|
||||
void vinfoDownloadFailed();
|
||||
|
||||
void fileDownloadFinished();
|
||||
void fileDownloadFailed();
|
||||
void fileDownloadFailed(QString reason);
|
||||
void fileDownloadProgressChanged(qint64 current, qint64 total);
|
||||
};
|
||||
|
||||
|
@ -96,7 +96,7 @@ void UpdateChecker::checkForUpdate(QString updateChannel, bool notifyNoUpdate)
|
||||
job->addNetAction(ByteArrayDownload::make(indexUrl));
|
||||
connect(job, &NetJob::succeeded, [this, notifyNoUpdate]()
|
||||
{ updateCheckFinished(notifyNoUpdate); });
|
||||
connect(job, SIGNAL(failed()), SLOT(updateCheckFailed()));
|
||||
connect(job, &NetJob::failed, this, &UpdateChecker::updateCheckFailed);
|
||||
indexJob.reset(job);
|
||||
job->start();
|
||||
}
|
||||
@ -260,10 +260,10 @@ void UpdateChecker::chanListDownloadFinished(bool notifyNoUpdate)
|
||||
emit channelListLoaded();
|
||||
}
|
||||
|
||||
void UpdateChecker::chanListDownloadFailed()
|
||||
void UpdateChecker::chanListDownloadFailed(QString reason)
|
||||
{
|
||||
m_chanListLoading = false;
|
||||
qCritical() << "Failed to download channel list.";
|
||||
qCritical() << QString("Failed to download channel list: %1").arg(reason);
|
||||
emit channelListLoaded();
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ private slots:
|
||||
void updateCheckFailed();
|
||||
|
||||
void chanListDownloadFinished(bool notifyNoUpdate);
|
||||
void chanListDownloadFailed();
|
||||
void chanListDownloadFailed(QString reason);
|
||||
|
||||
private:
|
||||
friend class UpdateCheckerTest;
|
||||
|
Reference in New Issue
Block a user