summaryrefslogtreecommitdiffstats
path: root/logic/lists/ForgeVersionList.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-20 01:32:38 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-20 01:32:38 +0100
commit222d3c0dc5a8b8a9e93b9368e964cda7becc7f02 (patch)
tree9ab4538f2e80847874a7c9a5c7c2dbc099cb8cae /logic/lists/ForgeVersionList.cpp
parent48b587e7b6b96b5c3ac17dc8b67a7b0ab9c2c4f0 (diff)
parent3a3c9ac9515447941d383f2c4fe4b0225fdd8252 (diff)
downloadMultiMC-222d3c0dc5a8b8a9e93b9368e964cda7becc7f02.tar
MultiMC-222d3c0dc5a8b8a9e93b9368e964cda7becc7f02.tar.gz
MultiMC-222d3c0dc5a8b8a9e93b9368e964cda7becc7f02.tar.lz
MultiMC-222d3c0dc5a8b8a9e93b9368e964cda7becc7f02.tar.xz
MultiMC-222d3c0dc5a8b8a9e93b9368e964cda7becc7f02.zip
Merge branch 'release-0.2'0.2
Diffstat (limited to 'logic/lists/ForgeVersionList.cpp')
-rw-r--r--logic/lists/ForgeVersionList.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/logic/lists/ForgeVersionList.cpp b/logic/lists/ForgeVersionList.cpp
index 56eca744..4902dc64 100644
--- a/logic/lists/ForgeVersionList.cpp
+++ b/logic/lists/ForgeVersionList.cpp
@@ -187,7 +187,7 @@ bool ForgeListLoadTask::parseForgeList(QList<BaseVersionPtr> &out)
QByteArray data;
{
auto dlJob = listDownload;
- auto filename = std::dynamic_pointer_cast<CacheDownload>(dlJob)->m_target_path;
+ auto filename = std::dynamic_pointer_cast<CacheDownload>(dlJob)->getTargetFilepath();
QFile listFile(filename);
if (!listFile.open(QIODevice::ReadOnly))
{
@@ -303,7 +303,7 @@ bool ForgeListLoadTask::parseForgeGradleList(QList<BaseVersionPtr> &out)
QByteArray data;
{
auto dlJob = gradleListDownload;
- auto filename = std::dynamic_pointer_cast<CacheDownload>(dlJob)->m_target_path;
+ auto filename = std::dynamic_pointer_cast<CacheDownload>(dlJob)->getTargetFilepath();
QFile listFile(filename);
if (!listFile.open(QIODevice::ReadOnly))
{
@@ -404,12 +404,8 @@ void ForgeListLoadTask::listDownloaded()
{
return;
}
-
- qSort(list.begin(), list.end(), [](const BaseVersionPtr & p1, const BaseVersionPtr & p2)
- {
- // TODO better comparison (takes major/minor/build number into account)
- return p1->name() > p2->name();
- });
+ std::sort(list.begin(), list.end(), [](const BaseVersionPtr & l, const BaseVersionPtr & r)
+ { return (*l > *r); });
m_list->updateListData(list);