First sweep moving URLs to a constants file
This commit is contained in:
parent
808ca76363
commit
979946b7bb
11 changed files with 56 additions and 20 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "MinecraftVersionList.h"
|
||||
#include "MultiMC.h"
|
||||
#include "logic/net/URLConstants.h"
|
||||
|
||||
#include <QtXml>
|
||||
|
||||
|
@ -28,10 +29,6 @@
|
|||
|
||||
#include <QtNetwork>
|
||||
|
||||
#define MCVLIST_URLBASE "http://s3.amazonaws.com/Minecraft.Download/versions/"
|
||||
#define ASSETS_URLBASE "http://assets.minecraft.net/"
|
||||
#define MCN_URLBASE "http://sonicrules.org/mcnweb.py"
|
||||
|
||||
MinecraftVersionList::MinecraftVersionList(QObject *parent) : BaseVersionList(parent)
|
||||
{
|
||||
}
|
||||
|
@ -144,7 +141,7 @@ void MCVListLoadTask::executeTask()
|
|||
{
|
||||
setStatus("Loading instance version list...");
|
||||
auto worker = MMC->qnam();
|
||||
vlistReply = worker->get(QNetworkRequest(QUrl(QString(MCVLIST_URLBASE) + "versions.json")));
|
||||
vlistReply = worker->get(QNetworkRequest(QUrl("http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + "versions.json")));
|
||||
connect(vlistReply, SIGNAL(finished()), this, SLOT(list_downloaded()));
|
||||
}
|
||||
|
||||
|
@ -270,7 +267,7 @@ void MCVListLoadTask::list_downloaded()
|
|||
continue;
|
||||
}
|
||||
// Get the download URL.
|
||||
QString dlUrl = QString(MCVLIST_URLBASE) + versionID + "/";
|
||||
QString dlUrl = "http://" + URLConstants::AWS_DOWNLOAD_VERSIONS + versionID + "/";
|
||||
|
||||
// Now, we construct the version object and add it to the list.
|
||||
std::shared_ptr<MinecraftVersion> mcVersion(new MinecraftVersion());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue