aboutsummaryrefslogtreecommitdiff
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/CMakeLists.txt5
-rw-r--r--application/KonamiCode.cpp2
-rw-r--r--application/pages/modplatform/atlauncher/AtlListModel.cpp (renamed from application/pages/modplatform/atlauncher/AtlModel.cpp)13
-rw-r--r--application/pages/modplatform/atlauncher/AtlListModel.h (renamed from application/pages/modplatform/atlauncher/AtlModel.h)0
-rw-r--r--application/pages/modplatform/atlauncher/AtlPage.h2
5 files changed, 15 insertions, 7 deletions
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index afd13574..fd49c267 100644
--- a/application/CMakeLists.txt
+++ b/application/CMakeLists.txt
@@ -125,13 +125,12 @@ SET(MULTIMC_SOURCES
pages/modplatform/VanillaPage.cpp
pages/modplatform/VanillaPage.h
- pages/modplatform/atlauncher/AtlModel.cpp
- pages/modplatform/atlauncher/AtlModel.h
pages/modplatform/atlauncher/AtlFilterModel.cpp
pages/modplatform/atlauncher/AtlFilterModel.h
+ pages/modplatform/atlauncher/AtlListModel.cpp
+ pages/modplatform/atlauncher/AtlListModel.h
pages/modplatform/atlauncher/AtlPage.cpp
pages/modplatform/atlauncher/AtlPage.h
- pages/modplatform/atlauncher/AtlPage.h
pages/modplatform/ftb/FtbFilterModel.cpp
pages/modplatform/ftb/FtbFilterModel.h
diff --git a/application/KonamiCode.cpp b/application/KonamiCode.cpp
index 4c5af837..46a2a0b2 100644
--- a/application/KonamiCode.cpp
+++ b/application/KonamiCode.cpp
@@ -35,7 +35,7 @@ void KonamiCode::input(QEvent* event)
{
m_progress = 0;
}
- if(m_progress == konamiCode.size())
+ if(m_progress == static_cast<int>(konamiCode.size()))
{
m_progress = 0;
emit triggered();
diff --git a/application/pages/modplatform/atlauncher/AtlModel.cpp b/application/pages/modplatform/atlauncher/AtlListModel.cpp
index 4b1b1c8e..f3be6198 100644
--- a/application/pages/modplatform/atlauncher/AtlModel.cpp
+++ b/application/pages/modplatform/atlauncher/AtlListModel.cpp
@@ -1,8 +1,9 @@
-#include "AtlModel.h"
+#include "AtlListModel.h"
#include <BuildConfig.h>
#include <MultiMC.h>
#include <Env.h>
+#include <Json.h>
namespace Atl {
@@ -99,7 +100,15 @@ void ListModel::requestFinished()
auto packObj = packRaw.toObject();
ATLauncher::IndexedPack pack;
- ATLauncher::loadIndexedPack(pack, packObj);
+
+ try {
+ ATLauncher::loadIndexedPack(pack, packObj);
+ }
+ catch (const JSONValidationError &e) {
+ qDebug() << QString::fromUtf8(response);
+ qWarning() << "Error while reading pack manifest from ATLauncher: " << e.cause();
+ return;
+ }
// ignore packs without a published version
if(pack.versions.length() == 0) continue;
diff --git a/application/pages/modplatform/atlauncher/AtlModel.h b/application/pages/modplatform/atlauncher/AtlListModel.h
index 2d30a64e..2d30a64e 100644
--- a/application/pages/modplatform/atlauncher/AtlModel.h
+++ b/application/pages/modplatform/atlauncher/AtlListModel.h
diff --git a/application/pages/modplatform/atlauncher/AtlPage.h b/application/pages/modplatform/atlauncher/AtlPage.h
index 368de666..715cf5f4 100644
--- a/application/pages/modplatform/atlauncher/AtlPage.h
+++ b/application/pages/modplatform/atlauncher/AtlPage.h
@@ -16,7 +16,7 @@
#pragma once
#include "AtlFilterModel.h"
-#include "AtlModel.h"
+#include "AtlListModel.h"
#include <QWidget>