mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 04:51:48 +00:00
Merge with develop
This commit is contained in:
parent
f95d95bdc5
commit
7e6c5c13bd
1 changed files with 4 additions and 11 deletions
|
@ -47,7 +47,7 @@ bool CDownloader::getHtmlPageContent(const QString &url)
|
|||
if (url.isEmpty()) return false;
|
||||
|
||||
QNetworkRequest request(url);
|
||||
request.setHeader(QNetworkRequest::UserAgentHeader, "Ryzom Installer/1.0");
|
||||
request.setHeader(QNetworkRequest::UserAgentHeader, QString("Ryzom Installer/%1").arg(QApplication::applicationVersion()));
|
||||
|
||||
QNetworkReply *reply = m_manager->get(request);
|
||||
|
||||
|
@ -76,7 +76,7 @@ bool CDownloader::getFile()
|
|||
{
|
||||
if (m_fullPath.isEmpty() || m_url.isEmpty())
|
||||
{
|
||||
qDebug() << "You forget to call prepareFile before";
|
||||
nlwarning("You forget to call prepareFile before");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ bool CDownloader::checkDownloadedFile()
|
|||
|
||||
void CDownloader::onTimeout()
|
||||
{
|
||||
qDebug() << "Timeout";
|
||||
nlwarning("Timeout");
|
||||
|
||||
if (m_listener) m_listener->operationFail(tr("Timeout"));
|
||||
}
|
||||
|
@ -350,13 +350,6 @@ void CDownloader::onHeadFinished()
|
|||
}
|
||||
}
|
||||
|
||||
// error when download is not yet ready
|
||||
else if (status == 307)
|
||||
{
|
||||
if (m_listener) m_listener->operationFail(tr("File is not available, please retry later (status code: %1)").arg(status));
|
||||
return;
|
||||
}
|
||||
|
||||
// other status
|
||||
else
|
||||
{
|
||||
|
@ -368,7 +361,7 @@ void CDownloader::onHeadFinished()
|
|||
{
|
||||
if (checkDownloadedFile())
|
||||
{
|
||||
qDebug() << "same date and size";
|
||||
nlwarning("Same date and size");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue