NOISSUE remove use of obsolete URL constants, simplify the rest
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
#include "FileSystem.h"
|
||||
#include "net/Download.h"
|
||||
#include "net/ChecksumValidator.h"
|
||||
#include "net/URLConstants.h"
|
||||
|
||||
|
||||
namespace AssetsUtils
|
||||
@ -212,7 +213,7 @@ QString AssetObject::getLocalPath()
|
||||
|
||||
QUrl AssetObject::getUrl()
|
||||
{
|
||||
return QUrl("https://resources.download.minecraft.net/" + getRelPath());
|
||||
return URLConstants::RESOURCE_BASE + getRelPath();
|
||||
}
|
||||
|
||||
QString AssetObject::getRelPath()
|
||||
|
@ -192,7 +192,7 @@ QList< std::shared_ptr< NetAction > > Library::getDownloads(OpSys system, class
|
||||
|
||||
if (m_repositoryURL.isEmpty())
|
||||
{
|
||||
return QString("https://" + URLConstants::LIBRARY_BASE) + raw_storage;
|
||||
return URLConstants::LIBRARY_BASE + raw_storage;
|
||||
}
|
||||
|
||||
if(m_repositoryURL.endsWith('/'))
|
||||
|
@ -42,7 +42,7 @@ void YggdrasilTask::executeTask()
|
||||
// Get the content of the request we're going to send to the server.
|
||||
QJsonDocument doc(getRequestContent());
|
||||
|
||||
QUrl reqUrl("https://" + URLConstants::AUTH_BASE + getEndpoint());
|
||||
QUrl reqUrl(URLConstants::AUTH_BASE + getEndpoint());
|
||||
QNetworkRequest netRequest(reqUrl);
|
||||
netRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||
|
||||
|
@ -63,8 +63,7 @@ void FMLLibrariesTask::executeTask()
|
||||
for (auto &lib : fmlLibsToProcess)
|
||||
{
|
||||
auto entry = metacache->resolveEntry("fmllibs", lib.filename);
|
||||
QString urlString = lib.ours ? URLConstants::FMLLIBS_OUR_BASE_URL + lib.filename
|
||||
: URLConstants::FMLLIBS_FORGE_BASE_URL + lib.filename;
|
||||
QString urlString = (lib.ours ? URLConstants::FMLLIBS_OUR_BASE_URL : URLConstants::FMLLIBS_FORGE_BASE_URL) + lib.filename;
|
||||
dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user