diff options
author | Sky <git@bunnies.cc> | 2013-12-13 14:58:11 +0000 |
---|---|---|
committer | Sky <git@bunnies.cc> | 2013-12-13 14:58:11 +0000 |
commit | 979946b7bb2cec808198f9194169ea08cce8bb00 (patch) | |
tree | 76db4173a0f896b7accfcdf8bb8a7dd143525922 /logic/lists/MinecraftVersionList.cpp | |
parent | 808ca763632090abdab5a2451c95dbb0f4319126 (diff) | |
download | MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar.gz MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar.lz MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.tar.xz MultiMC-979946b7bb2cec808198f9194169ea08cce8bb00.zip |
First sweep moving URLs to a constants file
Diffstat (limited to 'logic/lists/MinecraftVersionList.cpp')
-rw-r--r-- | logic/lists/MinecraftVersionList.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
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 <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()); |