|
|
|
@ -34,7 +34,6 @@
@@ -34,7 +34,6 @@
|
|
|
|
|
#include <QNetworkAccessManager> |
|
|
|
|
#include <QNetworkCookie> |
|
|
|
|
#include <QNetworkProxy> |
|
|
|
|
#include <QNetworkReply> |
|
|
|
|
#include <QNetworkRequest> |
|
|
|
|
#include <QTemporaryFile> |
|
|
|
|
#include <QUrl> |
|
|
|
@ -46,9 +45,6 @@
@@ -46,9 +45,6 @@
|
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
|
{ |
|
|
|
|
QString tr(const char *message); |
|
|
|
|
QString errorCodeToString(QNetworkReply::NetworkError status); |
|
|
|
|
|
|
|
|
|
bool saveToFile(const QByteArray &replyData, QString &filePath) |
|
|
|
|
{ |
|
|
|
|
QTemporaryFile tmpfile {Utils::Fs::tempPath() + "XXXXXX"}; |
|
|
|
@ -203,15 +199,8 @@ void Net::DownloadHandler::handleRedirection(QUrl newUrl)
@@ -203,15 +199,8 @@ void Net::DownloadHandler::handleRedirection(QUrl newUrl)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
|
QString Net::DownloadHandler::errorCodeToString(const QNetworkReply::NetworkError status) |
|
|
|
|
{ |
|
|
|
|
QString tr(const char *message) |
|
|
|
|
{ |
|
|
|
|
return QCoreApplication::translate("DownloadHandler", message); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QString errorCodeToString(QNetworkReply::NetworkError status) |
|
|
|
|
{ |
|
|
|
|
switch (status) { |
|
|
|
|
case QNetworkReply::HostNotFoundError: |
|
|
|
|
return tr("The remote host name was not found (invalid hostname)"); |
|
|
|
@ -258,5 +247,4 @@ namespace
@@ -258,5 +247,4 @@ namespace
|
|
|
|
|
default: |
|
|
|
|
return tr("Unknown error"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|