From 979946b7bb2cec808198f9194169ea08cce8bb00 Mon Sep 17 00:00:00 2001 From: Sky Date: Fri, 13 Dec 2013 14:58:11 +0000 Subject: First sweep moving URLs to a constants file --- logic/lists/MinecraftVersionList.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'logic/lists') diff --git a/logic/lists/MinecraftVersionList.cpp b/logic/lists/MinecraftVersionList.cpp index 2a9c0d3b..523b81ac 100644 --- a/logic/lists/MinecraftVersionList.cpp +++ b/logic/lists/MinecraftVersionList.cpp @@ -15,6 +15,7 @@ #include "MinecraftVersionList.h" #include "MultiMC.h" +#include "logic/net/URLConstants.h" #include @@ -28,10 +29,6 @@ #include -#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 mcVersion(new MinecraftVersion()); -- cgit v1.2.3