rbutil: HttpGet: Return NetworkError in done signal.

Return the status value instead of simply a bool.

Change-Id: I2bffaac0087418656e80c74dc352011a4ea32ab1
This commit is contained in:
Dominik Riebeling 2022-03-16 22:19:00 +01:00
parent 08b42791ff
commit a0459de4d5
13 changed files with 35 additions and 46 deletions

View file

@ -175,7 +175,7 @@ bool VoiceFileCreator::createVoiceFile()
}
void VoiceFileCreator::downloadDone(bool error)
void VoiceFileCreator::downloadDone(QNetworkReply::NetworkError error)
{
LOG_INFO() << "download done, error:" << error;
@ -190,7 +190,7 @@ void VoiceFileCreator::downloadDone(bool error)
if(getter->isCached())
emit logItem(tr("Cached file used."), LOGINFO);
if(error)
if(error != QNetworkReply::NoError)
{
emit logItem(tr("Download error: %1").arg(getter->errorString()),LOGERROR);
emit done(true);