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/main.cpp18
-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
-rw-r--r--application/themes/SystemTheme.cpp5
7 files changed, 20 insertions, 25 deletions
diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt
index c240baf2..c5be22d0 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/main.cpp b/application/main.cpp
index e29f3453..b0360c7e 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -4,10 +4,6 @@
#include <InstanceList.h>
#include <QDebug>
-#ifdef Q_OS_WIN
- #include<windows.h>
-#endif
-
// #define BREAK_INFINITE_LOOP
// #define BREAK_EXCEPTION
// #define BREAK_RETURN
@@ -33,19 +29,7 @@ int main(int argc, char *argv[])
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
- #ifdef Q_OS_WIN
- BOOL (__stdcall *pFn)(void);
- HINSTANCE hInstance=LoadLibrary("user32.dll");
- if(hInstance) {
- pFn = (BOOL (__stdcall*)(void))GetProcAddress(hInstance, "SetProcessDPIAware");
- if(pFn)
- pFn();
- FreeLibrary(hInstance);
- }
- QApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
- #else
- QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- #endif
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
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>
diff --git a/application/themes/SystemTheme.cpp b/application/themes/SystemTheme.cpp
index 00b2300d..49b1afaa 100644
--- a/application/themes/SystemTheme.cpp
+++ b/application/themes/SystemTheme.cpp
@@ -6,16 +6,19 @@
SystemTheme::SystemTheme()
{
+ qDebug() << "Determining System Theme...";
const auto & style = QApplication::style();
systemPalette = style->standardPalette();
QString lowerThemeName = style->objectName();
- qDebug() << systemTheme;
+ qDebug() << "System theme seems to be:" << lowerThemeName;
QStringList styles = QStyleFactory::keys();
for(auto &st: styles)
{
+ qDebug() << "Considering theme from theme factory:" << st.toLower();
if(st.toLower() == lowerThemeName)
{
systemTheme = st;
+ qDebug() << "System theme has been determined to be:" << systemTheme;
return;
}
}