summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/MinecraftVersion.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-02-17 08:10:31 +0100
committerPetr Mrázek <peterix@gmail.com>2016-02-17 08:23:57 +0100
commit163a3095b1fb8c2735fdd379e84d99f4c583d433 (patch)
tree69ed8e3a1958bcf2dfb84c8ac69b5b502a1ce9ca /logic/minecraft/MinecraftVersion.cpp
parenta20e2590da5b7d50201e40f717ad50b063d1e3ac (diff)
downloadMultiMC-163a3095b1fb8c2735fdd379e84d99f4c583d433.tar
MultiMC-163a3095b1fb8c2735fdd379e84d99f4c583d433.tar.gz
MultiMC-163a3095b1fb8c2735fdd379e84d99f4c583d433.tar.lz
MultiMC-163a3095b1fb8c2735fdd379e84d99f4c583d433.tar.xz
MultiMC-163a3095b1fb8c2735fdd379e84d99f4c583d433.zip
GH-1453 separate out Mojang version reading, use version file URLs
Diffstat (limited to 'logic/minecraft/MinecraftVersion.cpp')
-rw-r--r--logic/minecraft/MinecraftVersion.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/logic/minecraft/MinecraftVersion.cpp b/logic/minecraft/MinecraftVersion.cpp
index 1451c39d..96d64d6d 100644
--- a/logic/minecraft/MinecraftVersion.cpp
+++ b/logic/minecraft/MinecraftVersion.cpp
@@ -77,6 +77,15 @@ QJsonDocument MinecraftVersion::toJson(bool saveOrder)
}
}
+QString MinecraftVersion::getUrl() const
+{
+ if(m_versionFileURL.isEmpty())
+ {
+ return QString("http://") + URLConstants::AWS_DOWNLOAD_VERSIONS + m_descriptor + "/" + m_descriptor + ".json";
+ }
+ return m_versionFileURL;
+}
+
VersionFilePtr MinecraftVersion::getVersionFile()
{
QFileInfo versionFile(QString("versions/%1/%1.dat").arg(m_descriptor));