mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-27 19:30:54 +00:00
Fixed: Trying to resume after a 206 HTTP status code
--HG-- branch : develop
This commit is contained in:
parent
5539873337
commit
2858fce968
4 changed files with 12 additions and 1 deletions
|
@ -388,9 +388,13 @@ void CDownloader::onDownloadFinished()
|
||||||
|
|
||||||
emit downloadDone();
|
emit downloadDone();
|
||||||
}
|
}
|
||||||
|
else if (status == 206)
|
||||||
|
{
|
||||||
|
if (m_listener) m_listener->operationContinue();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_listener->operationFail(tr("HTTP error: %1").arg(status));
|
if (m_listener) m_listener->operationFail(tr("HTTP error: %1").arg(status));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public:
|
||||||
virtual void operationProgress(qint64 current, const QString &filename) =0;
|
virtual void operationProgress(qint64 current, const QString &filename) =0;
|
||||||
virtual void operationSuccess(qint64 total) =0;
|
virtual void operationSuccess(qint64 total) =0;
|
||||||
virtual void operationFail(const QString &error) =0;
|
virtual void operationFail(const QString &error) =0;
|
||||||
|
virtual void operationContinue() = 0;
|
||||||
|
|
||||||
virtual bool operationShouldStop() =0;
|
virtual bool operationShouldStop() =0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1264,6 +1264,11 @@ void COperationDialog::operationFail(const QString &error)
|
||||||
emit fail(error);
|
emit fail(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void COperationDialog::operationContinue()
|
||||||
|
{
|
||||||
|
emit done();
|
||||||
|
}
|
||||||
|
|
||||||
bool COperationDialog::operationShouldStop()
|
bool COperationDialog::operationShouldStop()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&m_abortingMutex);
|
QMutexLocker locker(&m_abortingMutex);
|
||||||
|
|
|
@ -129,6 +129,7 @@ protected:
|
||||||
virtual void operationProgress(qint64 current, const QString &filename);
|
virtual void operationProgress(qint64 current, const QString &filename);
|
||||||
virtual void operationSuccess(qint64 total);
|
virtual void operationSuccess(qint64 total);
|
||||||
virtual void operationFail(const QString &error);
|
virtual void operationFail(const QString &error);
|
||||||
|
virtual void operationContinue();
|
||||||
|
|
||||||
virtual bool operationShouldStop();
|
virtual bool operationShouldStop();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue