+
Boba %1
\n") .arg(getWebsite("https://cmdplusv.neocities.org/")); + stream << QString("Boba %1
\n") .arg(getWebsite("https://bobaonline.neocities.org/")); stream << QString("Davi Rafael %1
\n") .arg(getWebsite("https://auti.one/")); stream << QString("Fulmine %1
\n") .arg(getWebsite("https://www.fulmine.xyz/")); stream << QString("ely %1
\n") .arg(getGitHub("elyrodso")); -- cgit From 7f991ed897d0f344166511daddde4aa4994a67b0 Mon Sep 17 00:00:00 2001 From: txtsd
Date: Sat, 29 Oct 2022 19:24:12 +0530
Subject: feat: Add Repology badge to README
Signed-off-by: txtsd
---
README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index db0e2c62..57f1e30a 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,10 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC.
## Installation
+
+
+
+
- All downloads and instructions for Prism Launcher can be found [on our website](https://prismlauncher.org/download/).
- Last build status can be found [here](https://github.com/PrismLauncher/PrismLauncher/actions).
--
cgit
From b142a6da5b2ae433ce8164c7be0a3c3870131414 Mon Sep 17 00:00:00 2001
From: fn2006
Date: Sat, 29 Oct 2022 16:10:18 +0100
Subject: fix hardcoded svg
Signed-off-by: fn2006
---
buildconfig/BuildConfig.cpp.in | 1 +
buildconfig/BuildConfig.h | 1 +
launcher/Application.cpp | 2 +-
program_info/CMakeLists.txt | 1 +
4 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index b8fa5133..1262ce8e 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -49,6 +49,7 @@ Config::Config()
LAUNCHER_CONFIGFILE = "@Launcher_ConfigFile@";
LAUNCHER_GIT = "@Launcher_Git@";
LAUNCHER_DESKTOPFILENAME = "@Launcher_DesktopFileName@";
+ LAUNCHER_SVGFILENAME = "@Launcher_SVGFileName@";
USER_AGENT = "@Launcher_UserAgent@";
USER_AGENT_UNCACHED = USER_AGENT + " (Uncached)";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index 13ccdaa1..4a309073 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -51,6 +51,7 @@ class Config {
QString LAUNCHER_CONFIGFILE;
QString LAUNCHER_GIT;
QString LAUNCHER_DESKTOPFILENAME;
+ QString LAUNCHER_SVGFILENAME;
/// The major version number.
int VERSION_MAJOR;
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index f6b41850..c6814abf 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -1177,7 +1177,7 @@ void Application::setIconTheme(const QString& name)
QIcon Application::getThemedIcon(const QString& name)
{
if(name == "logo") {
- return QIcon(":/org.prismlauncher.PrismLauncher.svg"); // FIXME: Make this a BuildConfig variable
+ return QIcon(":/" + BuildConfig.LAUNCHER_SVGFILENAME);
}
return QIcon::fromTheme(name);
}
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index 61949e13..b0507816 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -22,6 +22,7 @@ set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_VERSION_NAME}" PARENT_
set(Launcher_ConfigFile "prismlauncher.cfg" PARENT_SCOPE)
set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher" PARENT_SCOPE)
set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
+set(Launcher_SVGFileName "org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
set(Launcher_Desktop "program_info/org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
set(Launcher_MetaInfo "program_info/org.prismlauncher.PrismLauncher.metainfo.xml" PARENT_SCOPE)
--
cgit
From 98891a036dcd96dc7d9bf6b8f11c2a5f2ddd054e Mon Sep 17 00:00:00 2001
From: fn2006
Date: Sat, 29 Oct 2022 17:35:37 +0100
Subject: use existing variables
Signed-off-by: fn2006
---
program_info/CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index b0507816..f064e098 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -21,12 +21,12 @@ set(Launcher_Domain "prismlauncher.org" PARENT_SCOPE)
set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_VERSION_NAME}" PARENT_SCOPE)
set(Launcher_ConfigFile "prismlauncher.cfg" PARENT_SCOPE)
set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher" PARENT_SCOPE)
-set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
-set(Launcher_SVGFileName "org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
+set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop")
+set(Launcher_SVGFileName "org.prismlauncher.PrismLauncher.svg")
-set(Launcher_Desktop "program_info/org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
+set(Launcher_Desktop "program_info/${Launcher_DesktopFileName}" PARENT_SCOPE)
set(Launcher_MetaInfo "program_info/org.prismlauncher.PrismLauncher.metainfo.xml" PARENT_SCOPE)
-set(Launcher_SVG "program_info/org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
+set(Launcher_SVG "program_info/${Launcher_SVGFileName}" PARENT_SCOPE)
set(Launcher_Branding_ICNS "program_info/prismlauncher.icns" PARENT_SCOPE)
set(Launcher_Branding_ICO "program_info/prismlauncher.ico")
set(Launcher_Branding_ICO "${Launcher_Branding_ICO}" PARENT_SCOPE)
--
cgit
From 19a8d51bf3567950db77d6bc05b16373fd1a0a1d Mon Sep 17 00:00:00 2001
From: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Date: Sun, 30 Oct 2022 11:52:16 +0800
Subject: fix: more user friendly Java warning text
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
---
launcher/minecraft/launch/VerifyJavaInstall.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/launcher/minecraft/launch/VerifyJavaInstall.cpp b/launcher/minecraft/launch/VerifyJavaInstall.cpp
index 99809f82..43f118f4 100644
--- a/launcher/minecraft/launch/VerifyJavaInstall.cpp
+++ b/launcher/minecraft/launch/VerifyJavaInstall.cpp
@@ -71,5 +71,7 @@ void VerifyJavaInstall::executeTask() {
{
emit logLine(tr("Java version %1").arg(major), MessageLevel::Error);
}
+ emit logLine(tr("If you are sure your version will work, go to instance settings and check \"Skip Java compatibility checks\"."), MessageLevel::Error);
+
emitFailed(QString("Incompatible Java major version"));
}
--
cgit
From b4be28b9bb29609212b398a5f46ee4dbc400cf2d Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu
Date: Sun, 30 Oct 2022 18:37:03 +0100
Subject: fix: fix disabled trash undo action
Signed-off-by: Sefa Eyeoglu
---
launcher/ui/MainWindow.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 559ebc31..55f3e4f8 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -1134,11 +1134,6 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
connect(actionDeleteGroup, SIGNAL(triggered(bool)), SLOT(deleteGroup()));
actions.append(actionDeleteGroup);
}
-
- QAction *actionUndoTrashInstance = new QAction("Undo last trash instance", this);
- connect(actionUndoTrashInstance, SIGNAL(triggered(bool)), SLOT(undoTrashInstance()));
- actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
- actions.append(actionUndoTrashInstance);
}
QMenu myMenu;
myMenu.addActions(actions);
@@ -1834,6 +1829,7 @@ void MainWindow::deleteGroup()
void MainWindow::undoTrashInstance()
{
APPLICATION->instances()->undoTrashInstance();
+ ui->actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
}
void MainWindow::on_actionViewInstanceFolder_triggered()
@@ -1940,6 +1936,7 @@ void MainWindow::on_actionDeleteInstance_triggered()
auto id = m_selectedInstance->id();
if (APPLICATION->instances()->trashInstance(id)) {
+ ui->actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
return;
}
--
cgit
From fd099166c6a69bf77491cef8aa42cbdf06c78e35 Mon Sep 17 00:00:00 2001
From: TheLastRar
Date: Sun, 30 Oct 2022 20:27:37 +0000
Subject: Fix: Check if Windows 10 before calling setDarkWinTitlebar()
Signed-off-by: TheLastRar
---
launcher/Application.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index c6814abf..38613280 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -62,6 +62,7 @@
#ifdef Q_OS_WIN
#include "ui/WinDarkmode.h"
+#include
#endif
#include "ui/setupwizard/SetupWizard.h"
@@ -1154,7 +1155,7 @@ void Application::setApplicationTheme(const QString& name, bool initial)
auto & theme = (*themeIter).second;
theme->apply(initial);
#ifdef Q_OS_WIN
- if (m_mainWindow) {
+ if (m_mainWindow && IsWindows10OrGreater()) {
if (QString::compare(theme->id(), "dark") == 0) {
WinDarkmode::setDarkWinTitlebar(m_mainWindow->winId(), true);
} else {
@@ -1395,10 +1396,13 @@ MainWindow* Application::showMainWindow(bool minimized)
m_mainWindow->restoreState(QByteArray::fromBase64(APPLICATION->settings()->get("MainWindowState").toByteArray()));
m_mainWindow->restoreGeometry(QByteArray::fromBase64(APPLICATION->settings()->get("MainWindowGeometry").toByteArray()));
#ifdef Q_OS_WIN
- if (QString::compare(settings()->get("ApplicationTheme").toString(), "dark") == 0) {
- WinDarkmode::setDarkWinTitlebar(m_mainWindow->winId(), true);
- } else {
- WinDarkmode::setDarkWinTitlebar(m_mainWindow->winId(), false);
+ if (IsWindows10OrGreater())
+ {
+ if (QString::compare(settings()->get("ApplicationTheme").toString(), "dark") == 0) {
+ WinDarkmode::setDarkWinTitlebar(m_mainWindow->winId(), true);
+ } else {
+ WinDarkmode::setDarkWinTitlebar(m_mainWindow->winId(), false);
+ }
}
#endif
if(minimized)
--
cgit
From b7d5fee9956a2fe7801f009eb7905eeae4f09c34 Mon Sep 17 00:00:00 2001
From: Fayne Aldan
Date: Sun, 30 Oct 2022 15:55:15 -0600
Subject: Change Profiles to Accounts for consistency
Signed-off-by: Fayne Aldan
---
launcher/ui/MainWindow.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 559ebc31..84a78941 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -527,7 +527,7 @@ public:
menuBar->addMenu(foldersMenu);
- profileMenu = menuBar->addMenu(tr("&Profiles"));
+ profileMenu = menuBar->addMenu(tr("&Accounts"));
profileMenu->setSeparatorsCollapsible(false);
profileMenu->addAction(actionManageAccounts);
@@ -1052,7 +1052,7 @@ void MainWindow::retranslateUi()
accountMenuButton->setText(profileLabel);
}
else {
- accountMenuButton->setText(tr("Profiles"));
+ accountMenuButton->setText(tr("Accounts"));
}
if (m_selectedInstance) {
@@ -1395,7 +1395,7 @@ void MainWindow::defaultAccountChanged()
// Set the icon to the "no account" icon.
accountMenuButton->setIcon(APPLICATION->getThemedIcon("noaccount"));
- accountMenuButton->setText(tr("Profiles"));
+ accountMenuButton->setText(tr("Accounts"));
}
bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
--
cgit
From 42350e689d9dba0c9385f15e7d4c4da0a71f200c Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu
Date: Sun, 30 Oct 2022 23:50:56 +0100
Subject: chore: improve display names of certain languages
Signed-off-by: Sefa Eyeoglu
---
launcher/translations/TranslationsModel.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/launcher/translations/TranslationsModel.cpp b/launcher/translations/TranslationsModel.cpp
index 2f57de3a..20aa6d04 100644
--- a/launcher/translations/TranslationsModel.cpp
+++ b/launcher/translations/TranslationsModel.cpp
@@ -83,6 +83,12 @@ struct Language
else if(key == "es_UY") {
result = u8"español de Latinoamérica";
}
+ else if(key == "en@pirate") {
+ result = u8"Tongue of the High Seas";
+ }
+ else if(key == "en@uwu") {
+ result = u8"Cute Engwish";
+ }
else {
result = locale.nativeLanguageName();
}
--
cgit
From 27dfe30fe61055de5591d60c43351c7b2ca22668 Mon Sep 17 00:00:00 2001
From: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Date: Mon, 31 Oct 2022 14:44:11 +0800
Subject: Update VerifyJavaInstall.cpp
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
---
launcher/minecraft/launch/VerifyJavaInstall.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/launcher/minecraft/launch/VerifyJavaInstall.cpp b/launcher/minecraft/launch/VerifyJavaInstall.cpp
index 43f118f4..89ece6e5 100644
--- a/launcher/minecraft/launch/VerifyJavaInstall.cpp
+++ b/launcher/minecraft/launch/VerifyJavaInstall.cpp
@@ -71,7 +71,7 @@ void VerifyJavaInstall::executeTask() {
{
emit logLine(tr("Java version %1").arg(major), MessageLevel::Error);
}
- emit logLine(tr("If you are sure your version will work, go to instance settings and check \"Skip Java compatibility checks\"."), MessageLevel::Error);
+ emit logLine(tr(""Go to instance Java settings to change your Java version or disable the Java compatibility check if you know what you're doing."), MessageLevel::Error);
emitFailed(QString("Incompatible Java major version"));
}
--
cgit
From 8467daa0ec71544b86fadae5bbaca9818f21254e Mon Sep 17 00:00:00 2001
From: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Date: Mon, 31 Oct 2022 14:58:38 +0800
Subject: oop
Signed-off-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
---
launcher/minecraft/launch/VerifyJavaInstall.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/launcher/minecraft/launch/VerifyJavaInstall.cpp b/launcher/minecraft/launch/VerifyJavaInstall.cpp
index 89ece6e5..6ae666b4 100644
--- a/launcher/minecraft/launch/VerifyJavaInstall.cpp
+++ b/launcher/minecraft/launch/VerifyJavaInstall.cpp
@@ -71,7 +71,7 @@ void VerifyJavaInstall::executeTask() {
{
emit logLine(tr("Java version %1").arg(major), MessageLevel::Error);
}
- emit logLine(tr(""Go to instance Java settings to change your Java version or disable the Java compatibility check if you know what you're doing."), MessageLevel::Error);
+ emit logLine(tr("Go to instance Java settings to change your Java version or disable the Java compatibility check if you know what you're doing."), MessageLevel::Error);
emitFailed(QString("Incompatible Java major version"));
}
--
cgit
From 29d362a6e08f28ac48e737510a17ae7b3b717850 Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu
Date: Sun, 30 Oct 2022 18:54:52 +0100
Subject: fix: do not trash instances in Flatpak
Signed-off-by: Sefa Eyeoglu
---
launcher/Application.cpp | 9 ---------
launcher/Application.h | 2 --
launcher/DesktopServices.cpp | 19 ++++++++++++++-----
launcher/DesktopServices.h | 2 ++
launcher/FileSystem.cpp | 4 ++++
launcher/ui/pages/global/LauncherPage.cpp | 3 ++-
6 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index c6814abf..0c370b42 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -1136,15 +1136,6 @@ std::vector Application::getValidApplicationThemes()
return ret;
}
-bool Application::isFlatpak()
-{
- #ifdef Q_OS_LINUX
- return QFile::exists("/.flatpak-info");
- #else
- return false;
- #endif
-}
-
void Application::setApplicationTheme(const QString& name, bool initial)
{
auto systemPalette = qApp->palette();
diff --git a/launcher/Application.h b/launcher/Application.h
index c453cc28..8fa0ab10 100644
--- a/launcher/Application.h
+++ b/launcher/Application.h
@@ -116,8 +116,6 @@ public:
QIcon getThemedIcon(const QString& name);
- bool isFlatpak();
-
void setIconTheme(const QString& name);
std::vector getValidApplicationThemes();
diff --git a/launcher/DesktopServices.cpp b/launcher/DesktopServices.cpp
index c29cbe7d..302eaf96 100644
--- a/launcher/DesktopServices.cpp
+++ b/launcher/DesktopServices.cpp
@@ -119,7 +119,7 @@ bool openDirectory(const QString &path, bool ensureExists)
return QDesktopServices::openUrl(QUrl::fromLocalFile(dir.absolutePath()));
};
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- if(!APPLICATION->isFlatpak())
+ if(!isFlatpak())
{
return IndirectOpen(f);
}
@@ -140,7 +140,7 @@ bool openFile(const QString &path)
return QDesktopServices::openUrl(QUrl::fromLocalFile(path));
};
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- if(!APPLICATION->isFlatpak())
+ if(!isFlatpak())
{
return IndirectOpen(f);
}
@@ -158,7 +158,7 @@ bool openFile(const QString &application, const QString &path, const QString &wo
qDebug() << "Opening file" << path << "using" << application;
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
// FIXME: the pid here is fake. So if something depends on it, it will likely misbehave
- if(!APPLICATION->isFlatpak())
+ if(!isFlatpak())
{
return IndirectOpen([&]()
{
@@ -178,7 +178,7 @@ bool run(const QString &application, const QStringList &args, const QString &wor
{
qDebug() << "Running" << application << "with args" << args.join(' ');
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- if(!APPLICATION->isFlatpak())
+ if(!isFlatpak())
{
// FIXME: the pid here is fake. So if something depends on it, it will likely misbehave
return IndirectOpen([&]()
@@ -203,7 +203,7 @@ bool openUrl(const QUrl &url)
return QDesktopServices::openUrl(url);
};
#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
- if(!APPLICATION->isFlatpak())
+ if(!isFlatpak())
{
return IndirectOpen(f);
}
@@ -216,4 +216,13 @@ bool openUrl(const QUrl &url)
#endif
}
+bool isFlatpak()
+{
+#ifdef Q_OS_LINUX
+ return QFile::exists("/.flatpak-info");
+#else
+ return false;
+#endif
+}
+
}
diff --git a/launcher/DesktopServices.h b/launcher/DesktopServices.h
index 1c081da4..21c9cae0 100644
--- a/launcher/DesktopServices.h
+++ b/launcher/DesktopServices.h
@@ -33,4 +33,6 @@ namespace DesktopServices
* Open the URL, most likely in a browser. Maybe.
*/
bool openUrl(const QUrl &url);
+
+ bool isFlatpak();
}
diff --git a/launcher/FileSystem.cpp b/launcher/FileSystem.cpp
index 76cfccb0..aaa75e6f 100644
--- a/launcher/FileSystem.cpp
+++ b/launcher/FileSystem.cpp
@@ -44,6 +44,7 @@
#include
#include
#include
+#include "DesktopServices.h"
#if defined Q_OS_WIN32
#include
@@ -228,6 +229,9 @@ bool trash(QString path, QString *pathInTrash = nullptr)
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
return false;
#else
+ // FIXME: Figure out trash in Flatpak. Qt seemingly doesn't use the Trash portal
+ if (DesktopServices::isFlatpak())
+ return false;
return QFile::moveToTrash(path, pathInTrash);
#endif
}
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 536ab22e..4ae7509c 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -49,6 +49,7 @@
#include
#include "Application.h"
#include "BuildConfig.h"
+#include "DesktopServices.h"
#include "ui/themes/ITheme.h"
#include
@@ -143,7 +144,7 @@ void LauncherPage::on_instDirBrowseBtn_clicked()
ui->instDirTextBox->setText(cooked_dir);
}
}
- else if(APPLICATION->isFlatpak() && raw_dir.startsWith("/run/user"))
+ else if(DesktopServices::isFlatpak() && raw_dir.startsWith("/run/user"))
{
QMessageBox warning;
warning.setText(tr("You're trying to specify an instance folder "
--
cgit
From f2d445d27b1052a038cd94a5c514cee807abd894 Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu
Date: Sun, 30 Oct 2022 19:08:02 +0100
Subject: fix: fix undo key sequence
Signed-off-by: Sefa Eyeoglu
---
launcher/ui/MainWindow.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 55f3e4f8..3b1779b7 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -335,11 +335,10 @@ public:
all_actions.append(&actionSettings);
actionUndoTrashInstance = TranslatedAction(MainWindow);
- connect(actionUndoTrashInstance, SIGNAL(triggered(bool)), MainWindow, SLOT(undoTrashInstance()));
actionUndoTrashInstance->setObjectName(QStringLiteral("actionUndoTrashInstance"));
actionUndoTrashInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Undo Last Instance Deletion"));
actionUndoTrashInstance->setEnabled(APPLICATION->instances()->trashedSomething());
- actionUndoTrashInstance->setShortcut(QKeySequence("Ctrl+Z"));
+ actionUndoTrashInstance->setShortcut(QKeySequence::Undo);
all_actions.append(&actionUndoTrashInstance);
actionClearMetadata = TranslatedAction(MainWindow);
@@ -1023,6 +1022,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
}
}
+ connect(ui->actionUndoTrashInstance.operator->(), &QAction::triggered, this, &MainWindow::undoTrashInstance);
+
setSelectedInstanceById(APPLICATION->settings()->get("SelectedInstance").toString());
// removing this looks stupid
--
cgit
From dfdf739282792ca646bb284b3d83b2d2265a9d55 Mon Sep 17 00:00:00 2001
From: Chrono
Date: Mon, 31 Oct 2022 19:44:55 -0400
Subject: remove one space
Signed-off-by: Chrono
---
launcher/ui/pages/global/APIPage.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/launcher/ui/pages/global/APIPage.ui b/launcher/ui/pages/global/APIPage.ui
index 1ae788c7..d56a9ef6 100644
--- a/launcher/ui/pages/global/APIPage.ui
+++ b/launcher/ui/pages/global/APIPage.ui
@@ -179,7 +179,7 @@
-
- Enter a custom client ID for Microsoft Authentication here.
+ Enter a custom client ID for Microsoft Authentication here.
Qt::RichText
--
cgit
From b142e2a7a75171da4c5bad9be17aa1bc52676b67 Mon Sep 17 00:00:00 2001
From: Sefa Eyeoglu
Date: Tue, 1 Nov 2022 13:59:11 +0100
Subject: fix: fix logo name
Signed-off-by: Sefa Eyeoglu
---
program_info/CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index f064e098..b0507816 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -21,12 +21,12 @@ set(Launcher_Domain "prismlauncher.org" PARENT_SCOPE)
set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_VERSION_NAME}" PARENT_SCOPE)
set(Launcher_ConfigFile "prismlauncher.cfg" PARENT_SCOPE)
set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher" PARENT_SCOPE)
-set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop")
-set(Launcher_SVGFileName "org.prismlauncher.PrismLauncher.svg")
+set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
+set(Launcher_SVGFileName "org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
-set(Launcher_Desktop "program_info/${Launcher_DesktopFileName}" PARENT_SCOPE)
+set(Launcher_Desktop "program_info/org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
set(Launcher_MetaInfo "program_info/org.prismlauncher.PrismLauncher.metainfo.xml" PARENT_SCOPE)
-set(Launcher_SVG "program_info/${Launcher_SVGFileName}" PARENT_SCOPE)
+set(Launcher_SVG "program_info/org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
set(Launcher_Branding_ICNS "program_info/prismlauncher.icns" PARENT_SCOPE)
set(Launcher_Branding_ICO "program_info/prismlauncher.ico")
set(Launcher_Branding_ICO "${Launcher_Branding_ICO}" PARENT_SCOPE)
--
cgit
From 718a9a35599a109578bbf36925548f60e9a0167d Mon Sep 17 00:00:00 2001
From: txtsd
Date: Wed, 2 Nov 2022 01:20:58 +0530
Subject: change: Update credits
Replaces txtsd's GitHub link with their website
Moves DioEgizio and flowln from contributors to dev team
Signed-off-by: txtsd
---
launcher/ui/dialogs/AboutDialog.cpp | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp
index 52d6baef..a36e4a3d 100644
--- a/launcher/ui/dialogs/AboutDialog.cpp
+++ b/launcher/ui/dialogs/AboutDialog.cpp
@@ -73,17 +73,12 @@ QString getCreditsHtml()
stream << "" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "
\n";
stream << QString("Sefa Eyeoglu (Scrumplex) %1
\n") .arg(getWebsite("https://scrumplex.net"));
stream << QString("dada513 %1
\n") .arg(getGitHub("dada513"));
- stream << QString("txtsd %1
\n") .arg(getGitHub("txtsd"));
+ stream << QString("txtsd %1
\n") .arg(getWebsite("https://ihavea.quest"));
stream << QString("timoreo %1
\n") .arg(getGitHub("timoreo22"));
stream << QString("Ezekiel Smith (ZekeSmith) %1
\n") .arg(getGitHub("ZekeSmith"));
stream << QString("cozyGalvinism %1
\n") .arg(getGitHub("cozyGalvinism"));
- stream << "
\n";
-
- //: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Contributors"
- stream << "" << QObject::tr("%1 Contributors", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "
\n";
stream << QString("DioEgizio %1
\n") .arg(getGitHub("DioEgizio"));
stream << QString("flowln %1
\n") .arg(getGitHub("flowln"));
- stream << QString("swirl %1
\n") .arg(getWebsite("https://swurl.xyz/"));
stream << "
\n";
// TODO: possibly retrieve from git history at build time?
--
cgit
From 0a0ce74105b1c01bb312175a823e715d6abb310c Mon Sep 17 00:00:00 2001
From: Santiago Cézar
Date: Tue, 1 Nov 2022 19:06:27 -0300
Subject: add rory
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Santiago Cézar
Co-authored-by: Ashtaka <66513643+AshtakaOOf@users.noreply.github.com>
---
launcher/Application.cpp | 1 +
launcher/resources/backgrounds/backgrounds.qrc | 9 ++++---
launcher/resources/backgrounds/catbgrnd2.png | Bin 62973 -> 0 bytes
launcher/resources/backgrounds/catmas.png | Bin 72818 -> 0 bytes
launcher/resources/backgrounds/cattiversary.png | Bin 99736 -> 0 bytes
launcher/resources/backgrounds/generic.jpg | Bin 0 -> 335269 bytes
launcher/resources/backgrounds/kitteh-bday.png | Bin 0 -> 99736 bytes
launcher/resources/backgrounds/kitteh-xmas.png | Bin 0 -> 72818 bytes
launcher/resources/backgrounds/kitteh.png | Bin 0 -> 62973 bytes
launcher/resources/backgrounds/rory-bday.png | Bin 0 -> 89472 bytes
launcher/resources/backgrounds/rory-xmas.png | Bin 0 -> 90158 bytes
launcher/resources/backgrounds/rory.png | Bin 0 -> 90624 bytes
launcher/ui/MainWindow.cpp | 17 ++++++------
launcher/ui/pages/global/LauncherPage.cpp | 16 ++++++++++++
launcher/ui/pages/global/LauncherPage.ui | 33 ++++++++++++++++++++++++
15 files changed, 65 insertions(+), 11 deletions(-)
delete mode 100644 launcher/resources/backgrounds/catbgrnd2.png
delete mode 100644 launcher/resources/backgrounds/catmas.png
delete mode 100644 launcher/resources/backgrounds/cattiversary.png
create mode 100644 launcher/resources/backgrounds/generic.jpg
create mode 100644 launcher/resources/backgrounds/kitteh-bday.png
create mode 100644 launcher/resources/backgrounds/kitteh-xmas.png
create mode 100644 launcher/resources/backgrounds/kitteh.png
create mode 100644 launcher/resources/backgrounds/rory-bday.png
create mode 100644 launcher/resources/backgrounds/rory-xmas.png
create mode 100644 launcher/resources/backgrounds/rory.png
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 2da8ac56..5772d7ca 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -501,6 +501,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Theming
m_settings->registerSetting("IconTheme", QString("pe_colored"));
m_settings->registerSetting("ApplicationTheme", QString("system"));
+ m_settings->registerSetting("BackgroundCat", QString("kitteh"));
// Remembered state
m_settings->registerSetting("LastUsedGroupForNewInstance", QString());
diff --git a/launcher/resources/backgrounds/backgrounds.qrc b/launcher/resources/backgrounds/backgrounds.qrc
index 52921512..db48af8b 100644
--- a/launcher/resources/backgrounds/backgrounds.qrc
+++ b/launcher/resources/backgrounds/backgrounds.qrc
@@ -1,8 +1,11 @@
- catbgrnd2.png
- catmas.png
- cattiversary.png
+ kitteh.png
+ kitteh-xmas.png
+ kitteh-bday.png
+ rory.png
+ rory-xmas.png
+ rory-bday.png
diff --git a/launcher/resources/backgrounds/catbgrnd2.png b/launcher/resources/backgrounds/catbgrnd2.png
deleted file mode 100644
index e9de7f27..00000000
Binary files a/launcher/resources/backgrounds/catbgrnd2.png and /dev/null differ
diff --git a/launcher/resources/backgrounds/catmas.png b/launcher/resources/backgrounds/catmas.png
deleted file mode 100644
index 8bdb1d5c..00000000
Binary files a/launcher/resources/backgrounds/catmas.png and /dev/null differ
diff --git a/launcher/resources/backgrounds/cattiversary.png b/launcher/resources/backgrounds/cattiversary.png
deleted file mode 100644
index 09a36566..00000000
Binary files a/launcher/resources/backgrounds/cattiversary.png and /dev/null differ
diff --git a/launcher/resources/backgrounds/generic.jpg b/launcher/resources/backgrounds/generic.jpg
new file mode 100644
index 00000000..c4832b0a
Binary files /dev/null and b/launcher/resources/backgrounds/generic.jpg differ
diff --git a/launcher/resources/backgrounds/kitteh-bday.png b/launcher/resources/backgrounds/kitteh-bday.png
new file mode 100644
index 00000000..09a36566
Binary files /dev/null and b/launcher/resources/backgrounds/kitteh-bday.png differ
diff --git a/launcher/resources/backgrounds/kitteh-xmas.png b/launcher/resources/backgrounds/kitteh-xmas.png
new file mode 100644
index 00000000..8bdb1d5c
Binary files /dev/null and b/launcher/resources/backgrounds/kitteh-xmas.png differ
diff --git a/launcher/resources/backgrounds/kitteh.png b/launcher/resources/backgrounds/kitteh.png
new file mode 100644
index 00000000..e9de7f27
Binary files /dev/null and b/launcher/resources/backgrounds/kitteh.png differ
diff --git a/launcher/resources/backgrounds/rory-bday.png b/launcher/resources/backgrounds/rory-bday.png
new file mode 100644
index 00000000..c1f576f0
Binary files /dev/null and b/launcher/resources/backgrounds/rory-bday.png differ
diff --git a/launcher/resources/backgrounds/rory-xmas.png b/launcher/resources/backgrounds/rory-xmas.png
new file mode 100644
index 00000000..6134c71a
Binary files /dev/null and b/launcher/resources/backgrounds/rory-xmas.png differ
diff --git a/launcher/resources/backgrounds/rory.png b/launcher/resources/backgrounds/rory.png
new file mode 100644
index 00000000..9dc69354
Binary files /dev/null and b/launcher/resources/backgrounds/rory.png differ
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index eda234df..2a6e8c1f 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -1560,15 +1560,15 @@ void MainWindow::setCatBackground(bool enabled)
QDateTime now = QDateTime::currentDateTime();
QDateTime birthday(QDate(now.date().year(), 11, 30), QTime(0, 0));
QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0));
- QString cat;
+ QString cat = APPLICATION->settings()->get("BackgroundCat").toString();
+
+ qDebug() << "The choosen cat is " << cat << ".";
+
if(non_stupid_abs(now.daysTo(xmas)) <= 4) {
- cat = "catmas";
+ cat += "-xmas";
}
else if (non_stupid_abs(now.daysTo(birthday)) <= 12) {
- cat = "cattiversary";
- }
- else {
- cat = "kitteh";
+ cat += "-bday";
}
view->setStyleSheet(QString(R"(
InstanceView
@@ -1576,10 +1576,11 @@ InstanceView
background-image: url(:/backgrounds/%1);
background-attachment: fixed;
background-clip: padding;
- background-position: top right;
+ background-position: bottom left;
background-repeat: none;
background-color:palette(base);
-})").arg(cat));
+})")
+ .arg(cat));
}
else
{
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 4ae7509c..44421d3b 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -334,6 +334,15 @@ void LauncherPage::applySettings()
APPLICATION->setApplicationTheme(newAppTheme, false);
}
+ switch (ui->themeBackgroundCat->currentIndex()) {
+ case 0: // original cat
+ s->set("BackgroundCat", "kitteh");
+ break;
+ case 1: // rory the cat
+ s->set("BackgroundCat", "rory");
+ break;
+ }
+
s->set("MenuBarInsteadOfToolBar", ui->preferMenuBarCheckBox->isChecked());
// Console settings
@@ -425,6 +434,13 @@ void LauncherPage::loadSettings()
ui->themeComboBox->setCurrentIndex(9);
}
+ auto cat = s->get("BackgroundCat").toString();
+ if (cat == "kitteh") {
+ ui->themeBackgroundCat->setCurrentIndex(0);
+ } else if (cat == "rory") {
+ ui->themeBackgroundCat->setCurrentIndex(1);
+ }
+
{
auto currentTheme = s->get("ApplicationTheme").toString();
auto themes = APPLICATION->getValidApplicationThemes();
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 76a25f2e..3a4e7da4 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -340,6 +340,39 @@
+ -
+
+
+ Cat
+
+
+ themeBackgroundCat
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Qt::StrongFocus
+
+ -
+
+ Background Cat (from MultiMC)
+
+
+ -
+
+ Rory ID 11 (drawn by Ashtaka)
+
+
+
+
--
cgit
From 668342b4708fca830a0650a6902805de3ff1380a Mon Sep 17 00:00:00 2001
From: Santiago Cézar
Date: Tue, 1 Nov 2022 19:31:37 -0300
Subject: add rory flat too (and holiday variants)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Santiago Cézar
Co-authored-by: Ashtaka <66513643+AshtakaOOf@users.noreply.github.com>
---
launcher/resources/backgrounds/generic.jpg | Bin 335269 -> 0 bytes
launcher/resources/backgrounds/rory-bday.png | Bin 89472 -> 83235 bytes
launcher/resources/backgrounds/rory-flat-bday.png | Bin 0 -> 57713 bytes
launcher/resources/backgrounds/rory-flat-xmas.png | Bin 0 -> 59495 bytes
launcher/resources/backgrounds/rory-flat.png | Bin 0 -> 52337 bytes
launcher/resources/backgrounds/rory-xmas.png | Bin 90158 -> 85543 bytes
launcher/resources/backgrounds/rory.png | Bin 90624 -> 76448 bytes
launcher/ui/pages/global/LauncherPage.cpp | 5 +++++
launcher/ui/pages/global/LauncherPage.ui | 5 +++++
9 files changed, 10 insertions(+)
delete mode 100644 launcher/resources/backgrounds/generic.jpg
create mode 100644 launcher/resources/backgrounds/rory-flat-bday.png
create mode 100644 launcher/resources/backgrounds/rory-flat-xmas.png
create mode 100644 launcher/resources/backgrounds/rory-flat.png
diff --git a/launcher/resources/backgrounds/generic.jpg b/launcher/resources/backgrounds/generic.jpg
deleted file mode 100644
index c4832b0a..00000000
Binary files a/launcher/resources/backgrounds/generic.jpg and /dev/null differ
diff --git a/launcher/resources/backgrounds/rory-bday.png b/launcher/resources/backgrounds/rory-bday.png
index c1f576f0..66b88094 100644
Binary files a/launcher/resources/backgrounds/rory-bday.png and b/launcher/resources/backgrounds/rory-bday.png differ
diff --git a/launcher/resources/backgrounds/rory-flat-bday.png b/launcher/resources/backgrounds/rory-flat-bday.png
new file mode 100644
index 00000000..8a6e366d
Binary files /dev/null and b/launcher/resources/backgrounds/rory-flat-bday.png differ
diff --git a/launcher/resources/backgrounds/rory-flat-xmas.png b/launcher/resources/backgrounds/rory-flat-xmas.png
new file mode 100644
index 00000000..96c3ae38
Binary files /dev/null and b/launcher/resources/backgrounds/rory-flat-xmas.png differ
diff --git a/launcher/resources/backgrounds/rory-flat.png b/launcher/resources/backgrounds/rory-flat.png
new file mode 100644
index 00000000..ccec0662
Binary files /dev/null and b/launcher/resources/backgrounds/rory-flat.png differ
diff --git a/launcher/resources/backgrounds/rory-xmas.png b/launcher/resources/backgrounds/rory-xmas.png
index 6134c71a..107feb78 100644
Binary files a/launcher/resources/backgrounds/rory-xmas.png and b/launcher/resources/backgrounds/rory-xmas.png differ
diff --git a/launcher/resources/backgrounds/rory.png b/launcher/resources/backgrounds/rory.png
index 9dc69354..577f4dce 100644
Binary files a/launcher/resources/backgrounds/rory.png and b/launcher/resources/backgrounds/rory.png differ
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 44421d3b..822c69b0 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -341,6 +341,9 @@ void LauncherPage::applySettings()
case 1: // rory the cat
s->set("BackgroundCat", "rory");
break;
+ case 2: // rory the cat flat edition
+ s->set("BackgroundCat", "rory-flat");
+ break;
}
s->set("MenuBarInsteadOfToolBar", ui->preferMenuBarCheckBox->isChecked());
@@ -439,6 +442,8 @@ void LauncherPage::loadSettings()
ui->themeBackgroundCat->setCurrentIndex(0);
} else if (cat == "rory") {
ui->themeBackgroundCat->setCurrentIndex(1);
+ } else if (cat == "rory-flat") {
+ ui->themeBackgroundCat->setCurrentIndex(2);
}
{
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 3a4e7da4..0b36652c 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -371,6 +371,11 @@
Rory ID 11 (drawn by Ashtaka)
+ -
+
+ Rory ID 11 (flat edition, drawn by Ashtaka)
+
+
--
cgit
From 7956e6f04e32448b0043a49ff08873e117ba0a0b Mon Sep 17 00:00:00 2001
From: flow
Date: Tue, 1 Nov 2022 19:48:26 -0300
Subject: fix: don't use forward-declared Ptr types in meta/
This would cause ODR violations when those headers were included in
other places that also included stuff like "Version.h" (note the
"meta/Version.h"), which can cause problems, especially in LTO.
Signed-off-by: flow
---
launcher/BaseInstaller.h | 5 ++--
launcher/BaseVersion.h | 5 ++--
launcher/BaseVersionList.cpp | 10 +++----
launcher/BaseVersionList.h | 8 +++---
launcher/java/JavaInstallList.cpp | 10 +++----
launcher/java/JavaInstallList.h | 6 ++--
launcher/meta/Index.cpp | 16 +++++------
launcher/meta/Index.h | 17 ++++++------
launcher/meta/JsonFormat.cpp | 18 ++++++------
launcher/meta/Version.cpp | 4 +--
launcher/meta/Version.h | 11 ++++----
launcher/meta/VersionList.cpp | 30 ++++++++++----------
launcher/meta/VersionList.h | 32 ++++++++++++----------
launcher/minecraft/VanillaInstanceCreationTask.cpp | 2 +-
launcher/minecraft/VanillaInstanceCreationTask.h | 8 +++---
.../modplatform/atlauncher/ATLPackInstallTask.cpp | 4 +--
.../modplatform/atlauncher/ATLPackInstallTask.h | 6 ++--
launcher/ui/dialogs/VersionSelectDialog.cpp | 2 +-
launcher/ui/dialogs/VersionSelectDialog.h | 2 +-
launcher/ui/pages/modplatform/VanillaPage.cpp | 8 +++---
launcher/ui/pages/modplatform/VanillaPage.h | 12 ++++----
.../atlauncher/AtlUserInteractionSupportImpl.cpp | 2 +-
.../atlauncher/AtlUserInteractionSupportImpl.h | 2 +-
launcher/ui/widgets/JavaSettingsWidget.cpp | 2 +-
launcher/ui/widgets/JavaSettingsWidget.h | 2 +-
launcher/ui/widgets/ModFilterWidget.h | 4 +--
launcher/ui/widgets/VersionSelectWidget.cpp | 6 ++--
launcher/ui/widgets/VersionSelectWidget.h | 4 +--
28 files changed, 120 insertions(+), 118 deletions(-)
diff --git a/launcher/BaseInstaller.h b/launcher/BaseInstaller.h
index b2e6a14d..a1b80e93 100644
--- a/launcher/BaseInstaller.h
+++ b/launcher/BaseInstaller.h
@@ -17,13 +17,14 @@
#include
+#include "BaseVersion.h"
+
class MinecraftInstance;
class QDir;
class QString;
class QObject;
class Task;
class BaseVersion;
-typedef std::shared_ptr BaseVersionPtr;
class BaseInstaller
{
@@ -35,7 +36,7 @@ public:
virtual bool add(MinecraftInstance *to);
virtual bool remove(MinecraftInstance *from);
- virtual Task *createInstallTask(MinecraftInstance *instance, BaseVersionPtr version, QObject *parent) = 0;
+ virtual Task *createInstallTask(MinecraftInstance *instance, BaseVersion::Ptr version, QObject *parent) = 0;
protected:
virtual QString id() const = 0;
diff --git a/launcher/BaseVersion.h b/launcher/BaseVersion.h
index b88105fb..ca0e4502 100644
--- a/launcher/BaseVersion.h
+++ b/launcher/BaseVersion.h
@@ -25,6 +25,7 @@
class BaseVersion
{
public:
+ using Ptr = std::shared_ptr;
virtual ~BaseVersion() {}
/*!
* A string used to identify this version in config files.
@@ -54,6 +55,4 @@ public:
};
};
-typedef std::shared_ptr BaseVersionPtr;
-
-Q_DECLARE_METATYPE(BaseVersionPtr)
+Q_DECLARE_METATYPE(BaseVersion::Ptr)
diff --git a/launcher/BaseVersionList.cpp b/launcher/BaseVersionList.cpp
index b4a7d6dd..4ed82612 100644
--- a/launcher/BaseVersionList.cpp
+++ b/launcher/BaseVersionList.cpp
@@ -40,20 +40,20 @@ BaseVersionList::BaseVersionList(QObject *parent) : QAbstractListModel(parent)
{
}
-BaseVersionPtr BaseVersionList::findVersion(const QString &descriptor)
+BaseVersion::Ptr BaseVersionList::findVersion(const QString &descriptor)
{
for (int i = 0; i < count(); i++)
{
if (at(i)->descriptor() == descriptor)
return at(i);
}
- return BaseVersionPtr();
+ return nullptr;
}
-BaseVersionPtr BaseVersionList::getRecommended() const
+BaseVersion::Ptr BaseVersionList::getRecommended() const
{
if (count() <= 0)
- return BaseVersionPtr();
+ return nullptr;
else
return at(0);
}
@@ -66,7 +66,7 @@ QVariant BaseVersionList::data(const QModelIndex &index, int role) const
if (index.row() > count())
return QVariant();
- BaseVersionPtr version = at(index.row());
+ BaseVersion::Ptr version = at(index.row());
switch (role)
{
diff --git a/launcher/BaseVersionList.h b/launcher/BaseVersionList.h
index 80a91e8f..31f29022 100644
--- a/launcher/BaseVersionList.h
+++ b/launcher/BaseVersionList.h
@@ -70,7 +70,7 @@ public:
virtual bool isLoaded() = 0;
//! Gets the version at the given index.
- virtual const BaseVersionPtr at(int i) const = 0;
+ virtual const BaseVersion::Ptr at(int i) const = 0;
//! Returns the number of versions in the list.
virtual int count() const = 0;
@@ -90,13 +90,13 @@ public:
* \return A const pointer to the version with the given descriptor. NULL if
* one doesn't exist.
*/
- virtual BaseVersionPtr findVersion(const QString &descriptor);
+ virtual BaseVersion::Ptr findVersion(const QString &descriptor);
/*!
* \brief Gets the recommended version from this list
* If the list doesn't support recommended versions, this works exactly as getLatestStable
*/
- virtual BaseVersionPtr getRecommended() const;
+ virtual BaseVersion::Ptr getRecommended() const;
/*!
* Sorts the version list.
@@ -117,5 +117,5 @@ slots:
* then copies the versions and sets their parents correctly.
* \param versions List of versions whose parents should be set.
*/
- virtual void updateListData(QList versions) = 0;
+ virtual void updateListData(QList versions) = 0;
};
diff --git a/launcher/java/JavaInstallList.cpp b/launcher/java/JavaInstallList.cpp
index 0249bd22..155c956a 100644
--- a/launcher/java/JavaInstallList.cpp
+++ b/launcher/java/JavaInstallList.cpp
@@ -73,7 +73,7 @@ void JavaInstallList::load()
}
}
-const BaseVersionPtr JavaInstallList::at(int i) const
+const BaseVersion::Ptr JavaInstallList::at(int i) const
{
return m_vlist.at(i);
}
@@ -122,7 +122,7 @@ BaseVersionList::RoleList JavaInstallList::providesRoles() const
}
-void JavaInstallList::updateListData(QList versions)
+void JavaInstallList::updateListData(QList versions)
{
beginResetModel();
m_vlist = versions;
@@ -137,7 +137,7 @@ void JavaInstallList::updateListData(QList versions)
m_loadTask.reset();
}
-bool sortJavas(BaseVersionPtr left, BaseVersionPtr right)
+bool sortJavas(BaseVersion::Ptr left, BaseVersion::Ptr right)
{
auto rleft = std::dynamic_pointer_cast(right);
auto rright = std::dynamic_pointer_cast(left);
@@ -210,11 +210,11 @@ void JavaListLoadTask::javaCheckerFinished()
}
}
- QList javas_bvp;
+ QList javas_bvp;
for (auto java : candidates)
{
//qDebug() << java->id << java->arch << " at " << java->path;
- BaseVersionPtr bp_java = std::dynamic_pointer_cast(java);
+ BaseVersion::Ptr bp_java = std::dynamic_pointer_cast(java);
if (bp_java)
{
diff --git a/launcher/java/JavaInstallList.h b/launcher/java/JavaInstallList.h
index 3c237edf..733dc7e1 100644
--- a/launcher/java/JavaInstallList.h
+++ b/launcher/java/JavaInstallList.h
@@ -42,7 +42,7 @@ public:
Task::Ptr getLoadTask() override;
bool isLoaded() override;
- const BaseVersionPtr at(int i) const override;
+ const BaseVersion::Ptr at(int i) const override;
int count() const override;
void sortVersions() override;
@@ -50,7 +50,7 @@ public:
RoleList providesRoles() const override;
public slots:
- void updateListData(QList versions) override;
+ void updateListData(QList versions) override;
protected:
void load();
@@ -59,7 +59,7 @@ protected:
protected:
Status m_status = Status::NotDone;
shared_qobject_ptr m_loadTask;
- QList m_vlist;
+ QList m_vlist;
};
class JavaListLoadTask : public Task
diff --git a/launcher/meta/Index.cpp b/launcher/meta/Index.cpp
index 6802470d..eec1b329 100644
--- a/launcher/meta/Index.cpp
+++ b/launcher/meta/Index.cpp
@@ -24,7 +24,7 @@ Index::Index(QObject *parent)
: QAbstractListModel(parent)
{
}
-Index::Index(const QVector &lists, QObject *parent)
+Index::Index(const QVector &lists, QObject *parent)
: QAbstractListModel(parent), m_lists(lists)
{
for (int i = 0; i < m_lists.size(); ++i)
@@ -41,7 +41,7 @@ QVariant Index::data(const QModelIndex &index, int role) const
return QVariant();
}
- VersionListPtr list = m_lists.at(index.row());
+ VersionList::Ptr list = m_lists.at(index.row());
switch (role)
{
case Qt::DisplayRole:
@@ -81,9 +81,9 @@ bool Index::hasUid(const QString &uid) const
return m_uids.contains(uid);
}
-VersionListPtr Index::get(const QString &uid)
+VersionList::Ptr Index::get(const QString &uid)
{
- VersionListPtr out = m_uids.value(uid, nullptr);
+ VersionList::Ptr out = m_uids.value(uid, nullptr);
if(!out)
{
out = std::make_shared(uid);
@@ -92,7 +92,7 @@ VersionListPtr Index::get(const QString &uid)
return out;
}
-VersionPtr Index::get(const QString &uid, const QString &version)
+Version::Ptr Index::get(const QString &uid, const QString &version)
{
auto list = get(uid);
return list->getVersion(version);
@@ -105,7 +105,7 @@ void Index::parse(const QJsonObject& obj)
void Index::merge(const std::shared_ptr &other)
{
- const QVector lists = std::dynamic_pointer_cast(other)->m_lists;
+ const QVector lists = std::dynamic_pointer_cast(other)->m_lists;
// initial load, no need to merge
if (m_lists.isEmpty())
{
@@ -120,7 +120,7 @@ void Index::merge(const std::shared_ptr &other)
}
else
{
- for (const VersionListPtr &list : lists)
+ for (const VersionList::Ptr &list : lists)
{
if (m_uids.contains(list->uid()))
{
@@ -138,7 +138,7 @@ void Index::merge(const std::shared_ptr &other)
}
}
-void Index::connectVersionList(const int row, const VersionListPtr &list)
+void Index::connectVersionList(const int row, const VersionList::Ptr &list)
{
connect(list.get(), &VersionList::nameChanged, this, [this, row]()
{
diff --git a/launcher/meta/Index.h b/launcher/meta/Index.h
index d33ab0c8..06ea09dc 100644
--- a/launcher/meta/Index.h
+++ b/launcher/meta/Index.h
@@ -19,20 +19,19 @@
#include
#include "BaseEntity.h"
+#include "meta/VersionList.h"
class Task;
namespace Meta
{
-using VersionListPtr = std::shared_ptr;
-using VersionPtr = std::shared_ptr;
class Index : public QAbstractListModel, public BaseEntity
{
Q_OBJECT
public:
explicit Index(QObject *parent = nullptr);
- explicit Index(const QVector &lists, QObject *parent = nullptr);
+ explicit Index(const QVector &lists, QObject *parent = nullptr);
enum
{
@@ -49,21 +48,21 @@ public:
QString localFilename() const override { return "index.json"; }
// queries
- VersionListPtr get(const QString &uid);
- VersionPtr get(const QString &uid, const QString &version);
+ VersionList::Ptr get(const QString &uid);
+ Version::Ptr get(const QString &uid, const QString &version);
bool hasUid(const QString &uid) const;
- QVector lists() const { return m_lists; }
+ QVector lists() const { return m_lists; }
public: // for usage by parsers only
void merge(const std::shared_ptr &other);
void parse(const QJsonObject &obj) override;
private:
- QVector m_lists;
- QHash m_uids;
+ QVector m_lists;
+ QHash m_uids;
- void connectVersionList(const int row, const VersionListPtr &list);
+ void connectVersionList(const int row, const VersionList::Ptr &list);
};
}
diff --git a/launcher/meta/JsonFormat.cpp b/launcher/meta/JsonFormat.cpp
index 796da4bb..473f37d6 100644
--- a/launcher/meta/JsonFormat.cpp
+++ b/launcher/meta/JsonFormat.cpp
@@ -37,11 +37,11 @@ MetadataVersion currentFormatVersion()
static std::shared_ptr parseIndexInternal(const QJsonObject &obj)
{
const QVector objects = requireIsArrayOf(obj, "packages");
- QVector lists;
+ QVector lists;
lists.reserve(objects.size());
std::transform(objects.begin(), objects.end(), std::back_inserter(lists), [](const QJsonObject &obj)
{
- VersionListPtr list = std::make_shared(requireString(obj, "uid"));
+ VersionList::Ptr list = std::make_shared(requireString(obj, "uid"));
list->setName(ensureString(obj, "name", QString()));
return list;
});
@@ -49,9 +49,9 @@ static std::shared_ptr parseIndexInternal(const QJsonObject &obj)
}
// Version
-static VersionPtr parseCommonVersion(const QString &uid, const QJsonObject &obj)
+static Version::Ptr parseCommonVersion(const QString &uid, const QJsonObject &obj)
{
- VersionPtr version = std::make_shared(uid, requireString(obj, "version"));
+ Version::Ptr version = std::make_shared(uid, requireString(obj, "version"));
version->setTime(QDateTime::fromString(requireString(obj, "releaseTime"), Qt::ISODate).toMSecsSinceEpoch() / 1000);
version->setType(ensureString(obj, "type", QString()));
version->setRecommended(ensureBoolean(obj, QString("recommended"), false));
@@ -63,9 +63,9 @@ static VersionPtr parseCommonVersion(const QString &uid, const QJsonObject &obj)
return version;
}
-static std::shared_ptr parseVersionInternal(const QJsonObject &obj)
+static Version::Ptr parseVersionInternal(const QJsonObject &obj)
{
- VersionPtr version = parseCommonVersion(requireString(obj, "uid"), obj);
+ Version::Ptr version = parseCommonVersion(requireString(obj, "uid"), obj);
version->setData(OneSixVersionFormat::versionFileFromJson(QJsonDocument(obj),
QString("%1/%2.json").arg(version->uid(), version->version()),
@@ -74,12 +74,12 @@ static std::shared_ptr parseVersionInternal(const QJsonObject &obj)
}
// Version list / package
-static std::shared_ptr parseVersionListInternal(const QJsonObject &obj)
+static VersionList::Ptr parseVersionListInternal(const QJsonObject &obj)
{
const QString uid = requireString(obj, "uid");
const QVector versionsRaw = requireIsArrayOf(obj, "versions");
- QVector versions;
+ QVector versions;
versions.reserve(versionsRaw.size());
std::transform(versionsRaw.begin(), versionsRaw.end(), std::back_inserter(versions), [uid](const QJsonObject &vObj)
{
@@ -88,7 +88,7 @@ static std::shared_ptr parseVersionListInternal(const QJsonObject &
return version;
});
- VersionListPtr list = std::make_shared(uid);
+ VersionList::Ptr list = std::make_shared(uid);
list->setName(ensureString(obj, "name", QString()));
list->setVersions(versions);
return list;
diff --git a/launcher/meta/Version.cpp b/launcher/meta/Version.cpp
index a8dc3169..68cfa55c 100644
--- a/launcher/meta/Version.cpp
+++ b/launcher/meta/Version.cpp
@@ -54,7 +54,7 @@ void Meta::Version::parse(const QJsonObject& obj)
parseVersion(obj, this);
}
-void Meta::Version::mergeFromList(const Meta::VersionPtr& other)
+void Meta::Version::mergeFromList(const Meta::Version::Ptr& other)
{
if(other->m_providesRecommendations)
{
@@ -85,7 +85,7 @@ void Meta::Version::mergeFromList(const Meta::VersionPtr& other)
}
}
-void Meta::Version::merge(const VersionPtr &other)
+void Meta::Version::merge(const Version::Ptr &other)
{
mergeFromList(other);
if(other->m_data)
diff --git a/launcher/meta/Version.h b/launcher/meta/Version.h
index dea8dc8a..7228fa36 100644
--- a/launcher/meta/Version.h
+++ b/launcher/meta/Version.h
@@ -30,13 +30,14 @@
namespace Meta
{
-using VersionPtr = std::shared_ptr;
class Version : public QObject, public BaseVersion, public BaseEntity
{
Q_OBJECT
-public: /* con/des */
+public:
+ using Ptr = std::shared_ptr;
+
explicit Version(const QString &uid, const QString &version);
virtual ~Version();
@@ -78,8 +79,8 @@ public: /* con/des */
return m_data != nullptr;
}
- void merge(const VersionPtr &other);
- void mergeFromList(const VersionPtr &other);
+ void merge(const Version::Ptr &other);
+ void mergeFromList(const Version::Ptr &other);
void parse(const QJsonObject &obj) override;
QString localFilename() const override;
@@ -113,4 +114,4 @@ private:
};
}
-Q_DECLARE_METATYPE(Meta::VersionPtr)
+Q_DECLARE_METATYPE(Meta::Version::Ptr)
diff --git a/launcher/meta/VersionList.cpp b/launcher/meta/VersionList.cpp
index f609e94c..7f001dfc 100644
--- a/launcher/meta/VersionList.cpp
+++ b/launcher/meta/VersionList.cpp
@@ -40,7 +40,7 @@ bool VersionList::isLoaded()
return BaseEntity::isLoaded();
}
-const BaseVersionPtr VersionList::at(int i) const
+const BaseVersion::Ptr VersionList::at(int i) const
{
return m_versions.at(i);
}
@@ -52,7 +52,7 @@ int VersionList::count() const
void VersionList::sortVersions()
{
beginResetModel();
- std::sort(m_versions.begin(), m_versions.end(), [](const VersionPtr &a, const VersionPtr &b)
+ std::sort(m_versions.begin(), m_versions.end(), [](const Version::Ptr &a, const Version::Ptr &b)
{
return *a.get() < *b.get();
});
@@ -66,7 +66,7 @@ QVariant VersionList::data(const QModelIndex &index, int role) const
return QVariant();
}
- VersionPtr version = m_versions.at(index.row());
+ Version::Ptr version = m_versions.at(index.row());
switch (role)
{
@@ -129,9 +129,9 @@ QString VersionList::humanReadable() const
return m_name.isEmpty() ? m_uid : m_name;
}
-VersionPtr VersionList::getVersion(const QString &version)
+Version::Ptr VersionList::getVersion(const QString &version)
{
- VersionPtr out = m_lookup.value(version, nullptr);
+ Version::Ptr out = m_lookup.value(version, nullptr);
if(!out)
{
out = std::make_shared(m_uid, version);
@@ -143,7 +143,7 @@ VersionPtr VersionList::getVersion(const QString &version)
bool VersionList::hasVersion(QString version) const
{
auto ver = std::find_if(m_versions.constBegin(), m_versions.constEnd(),
- [&](Meta::VersionPtr const& a){ return a->version() == version; });
+ [&](Meta::Version::Ptr const& a){ return a->version() == version; });
return (ver != m_versions.constEnd());
}
@@ -153,11 +153,11 @@ void VersionList::setName(const QString &name)
emit nameChanged(name);
}
-void VersionList::setVersions(const QVector &versions)
+void VersionList::setVersions(const QVector &versions)
{
beginResetModel();
m_versions = versions;
- std::sort(m_versions.begin(), m_versions.end(), [](const VersionPtr &a, const VersionPtr &b)
+ std::sort(m_versions.begin(), m_versions.end(), [](const Version::Ptr &a, const Version::Ptr &b)
{
return a->rawTime() > b->rawTime();
});
@@ -168,7 +168,7 @@ void VersionList::setVersions(const QVector &versions)
}
// FIXME: this is dumb, we have 'recommended' as part of the metadata already...
- auto recommendedIt = std::find_if(m_versions.constBegin(), m_versions.constEnd(), [](const VersionPtr &ptr) { return ptr->type() == "release"; });
+ auto recommendedIt = std::find_if(m_versions.constBegin(), m_versions.constEnd(), [](const Version::Ptr &ptr) { return ptr->type() == "release"; });
m_recommended = recommendedIt == m_versions.constEnd() ? nullptr : *recommendedIt;
endResetModel();
}
@@ -179,7 +179,7 @@ void VersionList::parse(const QJsonObject& obj)
}
// FIXME: this is dumb, we have 'recommended' as part of the metadata already...
-static const Meta::VersionPtr &getBetterVersion(const Meta::VersionPtr &a, const Meta::VersionPtr &b)
+static const Meta::Version::Ptr &getBetterVersion(const Meta::Version::Ptr &a, const Meta::Version::Ptr &b)
{
if(!a)
return b;
@@ -194,7 +194,7 @@ static const Meta::VersionPtr &getBetterVersion(const Meta::VersionPtr &a, const
return (a->type() == "release" ? a : b);
}
-void VersionList::mergeFromIndex(const VersionListPtr &other)
+void VersionList::mergeFromIndex(const VersionList::Ptr &other)
{
if (m_name != other->m_name)
{
@@ -202,7 +202,7 @@ void VersionList::mergeFromIndex(const VersionListPtr &other)
}
}
-void VersionList::merge(const VersionListPtr &other)
+void VersionList::merge(const VersionList::Ptr &other)
{
if (m_name != other->m_name)
{
@@ -216,7 +216,7 @@ void VersionList::merge(const VersionListPtr &other)
{
qWarning() << "Empty list loaded ...";
}
- for (const VersionPtr &version : other->m_versions)
+ for (const Version::Ptr &version : other->m_versions)
{
// we already have the version. merge the contents
if (m_lookup.contains(version->version()))
@@ -235,7 +235,7 @@ void VersionList::merge(const VersionListPtr &other)
endResetModel();
}
-void VersionList::setupAddedVersion(const int row, const VersionPtr &version)
+void VersionList::setupAddedVersion(const int row, const Version::Ptr &version)
{
// FIXME: do not disconnect from everythin, disconnect only the lambdas here
version->disconnect();
@@ -244,7 +244,7 @@ void VersionList::setupAddedVersion(const int row, const VersionPtr &version)
connect(version.get(), &Version::typeChanged, this, [this, row]() { emit dataChanged(index(row), index(row), QVector() << TypeRole); });
}
-BaseVersionPtr VersionList::getRecommended() const
+BaseVersion::Ptr VersionList::getRecommended() const
{
return m_recommended;
}
diff --git a/launcher/meta/VersionList.h b/launcher/meta/VersionList.h
index a6db2fd7..a4d5603d 100644
--- a/launcher/meta/VersionList.h
+++ b/launcher/meta/VersionList.h
@@ -20,10 +20,10 @@
#include
#include
+#include "meta/Version.h"
+
namespace Meta
{
-using VersionPtr = std::shared_ptr;
-using VersionListPtr = std::shared_ptr;
class VersionList : public BaseVersionList, public BaseEntity
{
@@ -33,6 +33,8 @@ class VersionList : public BaseVersionList, public BaseEntity
public:
explicit VersionList(const QString &uid, QObject *parent = nullptr);
+ using Ptr = std::shared_ptr;
+
enum Roles
{
UidRole = Qt::UserRole + 100,
@@ -43,11 +45,11 @@ public:
Task::Ptr getLoadTask() override;
bool isLoaded() override;
- const BaseVersionPtr at(int i) const override;
+ const BaseVersion::Ptr at(int i) const override;
int count() const override;
void sortVersions() override;
- BaseVersionPtr getRecommended() const override;
+ BaseVersion::Ptr getRecommended() const override;
QVariant data(const QModelIndex &index, int role) const override;
RoleList providesRoles() const override;
@@ -65,38 +67,38 @@ public:
}
QString humanReadable() const;
- VersionPtr getVersion(const QString &version);
+ Version::Ptr getVersion(const QString &version);
bool hasVersion(QString version) const;
- QVector versions() const
+ QVector versions() const
{
return m_versions;
}
public: // for usage only by parsers
void setName(const QString &name);
- void setVersions(const QVector &versions);
- void merge(const VersionListPtr &other);
- void mergeFromIndex(const VersionListPtr &other);
+ void setVersions(const QVector &versions);
+ void merge(const VersionList::Ptr &other);
+ void mergeFromIndex(const VersionList::Ptr &other);
void parse(const QJsonObject &obj) override;
signals:
void nameChanged(const QString &name);
protected slots:
- void updateListData(QList) override
+ void updateListData(QList) override
{
}
private:
- QVector m_versions;
- QHash m_lookup;
+ QVector m_versions;
+ QHash m_lookup;
QString m_uid;
QString m_name;
- VersionPtr m_recommended;
+ Version::Ptr m_recommended;
- void setupAddedVersion(const int row, const VersionPtr &version);
+ void setupAddedVersion(const int row, const Version::Ptr &version);
};
}
-Q_DECLARE_METATYPE(Meta::VersionListPtr)
+Q_DECLARE_METATYPE(Meta::VersionList::Ptr)
diff --git a/launcher/minecraft/VanillaInstanceCreationTask.cpp b/launcher/minecraft/VanillaInstanceCreationTask.cpp
index c45daa9a..0bb92e87 100644
--- a/launcher/minecraft/VanillaInstanceCreationTask.cpp
+++ b/launcher/minecraft/VanillaInstanceCreationTask.cpp
@@ -7,7 +7,7 @@
#include "minecraft/PackProfile.h"
#include "settings/INISettingsObject.h"
-VanillaCreationTask::VanillaCreationTask(BaseVersionPtr version, QString loader, BaseVersionPtr loader_version)
+VanillaCreationTask::VanillaCreationTask(BaseVersion::Ptr version, QString loader, BaseVersion::Ptr loader_version)
: InstanceCreationTask(), m_version(std::move(version)), m_using_loader(true), m_loader(std::move(loader)), m_loader_version(std::move(loader_version))
{}
diff --git a/launcher/minecraft/VanillaInstanceCreationTask.h b/launcher/minecraft/VanillaInstanceCreationTask.h
index 7a37bbd6..d1b81682 100644
--- a/launcher/minecraft/VanillaInstanceCreationTask.h
+++ b/launcher/minecraft/VanillaInstanceCreationTask.h
@@ -7,16 +7,16 @@
class VanillaCreationTask final : public InstanceCreationTask {
Q_OBJECT
public:
- VanillaCreationTask(BaseVersionPtr version) : InstanceCreationTask(), m_version(std::move(version)) {}
- VanillaCreationTask(BaseVersionPtr version, QString loader, BaseVersionPtr loader_version);
+ VanillaCreationTask(BaseVersion::Ptr version) : InstanceCreationTask(), m_version(std::move(version)) {}
+ VanillaCreationTask(BaseVersion::Ptr version, QString loader, BaseVersion::Ptr loader_version);
bool createInstance() override;
private:
// Version to update to / create of the instance.
- BaseVersionPtr m_version;
+ BaseVersion::Ptr m_version;
bool m_using_loader = false;
QString m_loader;
- BaseVersionPtr m_loader_version;
+ BaseVersion::Ptr m_loader_version;
};
diff --git a/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp b/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp
index 68d75943..291ad916 100644
--- a/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp
+++ b/launcher/modplatform/atlauncher/ATLPackInstallTask.cpp
@@ -58,7 +58,7 @@
namespace ATLauncher {
-static Meta::VersionPtr getComponentVersion(const QString& uid, const QString& version);
+static Meta::Version::Ptr getComponentVersion(const QString& uid, const QString& version);
PackInstallTask::PackInstallTask(UserInteractionSupport *support, QString packName, QString version, InstallMode installMode)
{
@@ -1037,7 +1037,7 @@ void PackInstallTask::install()
emitSucceeded();
}
-static Meta::VersionPtr getComponentVersion(const QString& uid, const QString& version)
+static Meta::Version::Ptr getComponentVersion(const QString& uid, const QString& version)
{
auto vlist = APPLICATION->metadataIndex()->get(uid);
if (!vlist)
diff --git a/launcher/modplatform/atlauncher/ATLPackInstallTask.h b/launcher/modplatform/atlauncher/ATLPackInstallTask.h
index 78cd87fb..90e25ae2 100644
--- a/launcher/modplatform/atlauncher/ATLPackInstallTask.h
+++ b/launcher/modplatform/atlauncher/ATLPackInstallTask.h
@@ -68,7 +68,7 @@ public:
* Requests a user interaction to select a component version from a given version list
* and constrained to a given Minecraft version.
*/
- virtual QString chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion) = 0;
+ virtual QString chooseVersion(Meta::VersionList::Ptr vlist, QString minecraftVersion) = 0;
/**
* Requests a user interaction to display a message.
@@ -137,8 +137,8 @@ private:
QString archivePath;
QStringList jarmods;
- Meta::VersionPtr minecraftVersion;
- QMap componentsToInstall;
+ Meta::Version::Ptr minecraftVersion;
+ QMap componentsToInstall;
QFuture> m_extractFuture;
QFutureWatcher> m_extractFutureWatcher;
diff --git a/launcher/ui/dialogs/VersionSelectDialog.cpp b/launcher/ui/dialogs/VersionSelectDialog.cpp
index 70ef72d6..d7880334 100644
--- a/launcher/ui/dialogs/VersionSelectDialog.cpp
+++ b/launcher/ui/dialogs/VersionSelectDialog.cpp
@@ -120,7 +120,7 @@ void VersionSelectDialog::selectRecommended()
m_versionWidget->selectRecommended();
}
-BaseVersionPtr VersionSelectDialog::selectedVersion() const
+BaseVersion::Ptr VersionSelectDialog::selectedVersion() const
{
return m_versionWidget->selectedVersion();
}
diff --git a/launcher/ui/dialogs/VersionSelectDialog.h b/launcher/ui/dialogs/VersionSelectDialog.h
index ed30d3f3..18a50cdb 100644
--- a/launcher/ui/dialogs/VersionSelectDialog.h
+++ b/launcher/ui/dialogs/VersionSelectDialog.h
@@ -44,7 +44,7 @@ public:
int exec() override;
- BaseVersionPtr selectedVersion() const;
+ BaseVersion::Ptr selectedVersion() const;
void setCurrentVersion(const QString & version);
void setFuzzyFilter(BaseVersionList::ModelRoles role, QString filter);
diff --git a/launcher/ui/pages/modplatform/VanillaPage.cpp b/launcher/ui/pages/modplatform/VanillaPage.cpp
index 99190f31..29fecb85 100644
--- a/launcher/ui/pages/modplatform/VanillaPage.cpp
+++ b/launcher/ui/pages/modplatform/VanillaPage.cpp
@@ -187,12 +187,12 @@ void VanillaPage::retranslate()
ui->retranslateUi(this);
}
-BaseVersionPtr VanillaPage::selectedVersion() const
+BaseVersion::Ptr VanillaPage::selectedVersion() const
{
return m_selectedVersion;
}
-BaseVersionPtr VanillaPage::selectedLoaderVersion() const
+BaseVersion::Ptr VanillaPage::selectedLoaderVersion() const
{
return m_selectedLoaderVersion;
}
@@ -227,14 +227,14 @@ void VanillaPage::suggestCurrent()
dialog->setSuggestedIcon("default");
}
-void VanillaPage::setSelectedVersion(BaseVersionPtr version)
+void VanillaPage::setSelectedVersion(BaseVersion::Ptr version)
{
m_selectedVersion = version;
suggestCurrent();
loaderFilterChanged();
}
-void VanillaPage::setSelectedLoaderVersion(BaseVersionPtr version)
+void VanillaPage::setSelectedLoaderVersion(BaseVersion::Ptr version)
{
m_selectedLoaderVersion = version;
suggestCurrent();
diff --git a/launcher/ui/pages/modplatform/VanillaPage.h b/launcher/ui/pages/modplatform/VanillaPage.h
index 7193597d..39aba760 100644
--- a/launcher/ui/pages/modplatform/VanillaPage.h
+++ b/launcher/ui/pages/modplatform/VanillaPage.h
@@ -76,13 +76,13 @@ public:
void openedImpl() override;
- BaseVersionPtr selectedVersion() const;
- BaseVersionPtr selectedLoaderVersion() const;
+ BaseVersion::Ptr selectedVersion() const;
+ BaseVersion::Ptr selectedLoaderVersion() const;
QString selectedLoader() const;
public slots:
- void setSelectedVersion(BaseVersionPtr version);
- void setSelectedLoaderVersion(BaseVersionPtr version);
+ void setSelectedVersion(BaseVersion::Ptr version);
+ void setSelectedLoaderVersion(BaseVersion::Ptr version);
private slots:
void filterChanged();
@@ -98,7 +98,7 @@ private:
NewInstanceDialog *dialog = nullptr;
Ui::VanillaPage *ui = nullptr;
bool m_versionSetByUser = false;
- BaseVersionPtr m_selectedVersion;
- BaseVersionPtr m_selectedLoaderVersion;
+ BaseVersion::Ptr m_selectedVersion;
+ BaseVersion::Ptr m_selectedLoaderVersion;
QString m_selectedLoader;
};
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp
index c68e40ba..f5f50cae 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.cpp
@@ -53,7 +53,7 @@ std::optional> AtlUserInteractionSupportImpl::chooseOptionalMod
return optionalModDialog.getResult();
}
-QString AtlUserInteractionSupportImpl::chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion)
+QString AtlUserInteractionSupportImpl::chooseVersion(Meta::VersionList::Ptr vlist, QString minecraftVersion)
{
VersionSelectDialog vselect(vlist.get(), "Choose Version", m_parent, false);
if (minecraftVersion != nullptr) {
diff --git a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h
index 3b37c9be..37010b3f 100644
--- a/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h
+++ b/launcher/ui/pages/modplatform/atlauncher/AtlUserInteractionSupportImpl.h
@@ -46,7 +46,7 @@ public:
AtlUserInteractionSupportImpl(QWidget* parent);
private:
- QString chooseVersion(Meta::VersionListPtr vlist, QString minecraftVersion) override;
+ QString chooseVersion(Meta::VersionList::Ptr vlist, QString minecraftVersion) override;
std::optional> chooseOptionalMods(ATLauncher::PackVersion version, QVector mods) override;
void displayMessage(QString message) override;
diff --git a/launcher/ui/widgets/JavaSettingsWidget.cpp b/launcher/ui/widgets/JavaSettingsWidget.cpp
index 314a126e..c7c4dbbd 100644
--- a/launcher/ui/widgets/JavaSettingsWidget.cpp
+++ b/launcher/ui/widgets/JavaSettingsWidget.cpp
@@ -245,7 +245,7 @@ void JavaSettingsWidget::memoryValueChanged(int)
}
}
-void JavaSettingsWidget::javaVersionSelected(BaseVersionPtr version)
+void JavaSettingsWidget::javaVersionSelected(BaseVersion::Ptr version)
{
auto java = std::dynamic_pointer_cast(version);
if(!java)
diff --git a/launcher/ui/widgets/JavaSettingsWidget.h b/launcher/ui/widgets/JavaSettingsWidget.h
index 0d280daf..5344e2cd 100644
--- a/launcher/ui/widgets/JavaSettingsWidget.h
+++ b/launcher/ui/widgets/JavaSettingsWidget.h
@@ -60,7 +60,7 @@ public:
protected slots:
void memoryValueChanged(int);
void javaPathEdited(const QString &path);
- void javaVersionSelected(BaseVersionPtr version);
+ void javaVersionSelected(BaseVersion::Ptr version);
void on_javaBrowseBtn_clicked();
void on_javaStatusBtn_clicked();
void checkFinished(JavaCheckResult result);
diff --git a/launcher/ui/widgets/ModFilterWidget.h b/launcher/ui/widgets/ModFilterWidget.h
index 958a1e2b..706ffd21 100644
--- a/launcher/ui/widgets/ModFilterWidget.h
+++ b/launcher/ui/widgets/ModFilterWidget.h
@@ -49,7 +49,7 @@ public:
auto getFilter() -> std::shared_ptr;
auto changed() const -> bool { return m_last_version_id != m_version_id; }
- Meta::VersionListPtr versionList() { return m_version_list; }
+ Meta::VersionList::Ptr versionList() { return m_version_list; }
private:
ModFilterWidget(Version def, QWidget* parent = nullptr);
@@ -73,7 +73,7 @@ private:
/* Version stuff */
QButtonGroup m_mcVersion_buttons;
- Meta::VersionListPtr m_version_list;
+ Meta::VersionList::Ptr m_version_list;
/* Used to tell if the filter was changed since the last getFilter() call */
VersionButtonID m_last_version_id = VersionButtonID::Strict;
diff --git a/launcher/ui/widgets/VersionSelectWidget.cpp b/launcher/ui/widgets/VersionSelectWidget.cpp
index cc4fc6a2..404860d9 100644
--- a/launcher/ui/widgets/VersionSelectWidget.cpp
+++ b/launcher/ui/widgets/VersionSelectWidget.cpp
@@ -142,7 +142,7 @@ void VersionSelectWidget::changeProgress(qint64 current, qint64 total)
void VersionSelectWidget::currentRowChanged(const QModelIndex& current, const QModelIndex&)
{
auto variant = m_proxyModel->data(current, BaseVersionList::VersionPointerRole);
- emit selectedVersionChanged(variant.value());
+ emit selectedVersionChanged(variant.value());
}
void VersionSelectWidget::preselect()
@@ -186,11 +186,11 @@ bool VersionSelectWidget::hasVersions() const
return m_proxyModel->rowCount(QModelIndex()) != 0;
}
-BaseVersionPtr VersionSelectWidget::selectedVersion() const
+BaseVersion::Ptr VersionSelectWidget::selectedVersion() const
{
auto currentIndex = listView->selectionModel()->currentIndex();
auto variant = m_proxyModel->data(currentIndex, BaseVersionList::VersionPointerRole);
- return variant.value();
+ return variant.value();
}
void VersionSelectWidget::setExactFilter(BaseVersionList::ModelRoles role, QString filter)
diff --git a/launcher/ui/widgets/VersionSelectWidget.h b/launcher/ui/widgets/VersionSelectWidget.h
index f56daa8a..e75efc6f 100644
--- a/launcher/ui/widgets/VersionSelectWidget.h
+++ b/launcher/ui/widgets/VersionSelectWidget.h
@@ -40,7 +40,7 @@ public:
void loadList();
bool hasVersions() const;
- BaseVersionPtr selectedVersion() const;
+ BaseVersion::Ptr selectedVersion() const;
void selectRecommended();
void selectCurrent();
@@ -54,7 +54,7 @@ public:
void setResizeOn(int column);
signals:
- void selectedVersionChanged(BaseVersionPtr version);
+ void selectedVersionChanged(BaseVersion::Ptr version);
protected:
virtual void closeEvent ( QCloseEvent* );
--
cgit
From 76203018e9dae39ebd7ee8db511a07736ea270f6 Mon Sep 17 00:00:00 2001
From: Santiago Cézar
Date: Tue, 1 Nov 2022 20:21:34 -0300
Subject: forgot the qrc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Santiago Cézar
---
launcher/resources/backgrounds/backgrounds.qrc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/launcher/resources/backgrounds/backgrounds.qrc b/launcher/resources/backgrounds/backgrounds.qrc
index db48af8b..fb426707 100644
--- a/launcher/resources/backgrounds/backgrounds.qrc
+++ b/launcher/resources/backgrounds/backgrounds.qrc
@@ -7,5 +7,8 @@
rory.png
rory-xmas.png
rory-bday.png
+ rory-flat.png
+ rory-flat-xmas.png
+ rory-flat-bday.png
--
cgit
From 48d34741f3255976cc2e208ef4bf858ae0beb782 Mon Sep 17 00:00:00 2001
From: Santiago Cézar
Date: Tue, 1 Nov 2022 22:53:45 -0300
Subject: keyboard navigation is important
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Santiago Cézar
---
launcher/ui/pages/global/LauncherPage.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 0b36652c..6de644ee 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -343,7 +343,7 @@
-
- Cat
+ C&at
themeBackgroundCat
--
cgit
From 9ca4f19aeabf3cc4a105159c4b4796101a401126 Mon Sep 17 00:00:00 2001
From: Santiago Cézar
Date: Wed, 2 Nov 2022 07:45:43 -0300
Subject: remove logcat
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Santiago Cézar
---
launcher/ui/MainWindow.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 2a6e8c1f..28eaa741 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -1562,8 +1562,6 @@ void MainWindow::setCatBackground(bool enabled)
QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0));
QString cat = APPLICATION->settings()->get("BackgroundCat").toString();
- qDebug() << "The choosen cat is " << cat << ".";
-
if(non_stupid_abs(now.daysTo(xmas)) <= 4) {
cat += "-xmas";
}
--
cgit
From 8d39a9ea6185eacb79dc30a36a9d8e8fcc631528 Mon Sep 17 00:00:00 2001
From: TheLastRar
Date: Wed, 2 Nov 2022 20:08:08 +0000
Subject: Fix: Increase stack size on Windows to 8MiB
Signed-off-by: TheLastRar
---
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94af61f3..ed83c205 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,11 @@ set(CMAKE_C_STANDARD 11)
include(GenerateExportHeader)
set(CMAKE_CXX_FLAGS "-Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 ${CMAKE_CXX_FLAGS}")
+# ATL's packlist needs more than the default 1 Mib stack on windows
+if(WIN32)
+ set(CMAKE_EXE_LINKER_FLAGS "-Wl,--stack,8388608 ${CMAKE_EXE_LINKER_FLAGS}")
+endif()
+
# Fix build with Qt 5.13
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
--
cgit
From 7eb0b1c69af3feb0c6dcce1e3293c42e11caede7 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 2 Nov 2022 23:02:32 +0000
Subject: chore(deps): update hendrikmuhs/ccache-action action to v1.2.4
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dd2c0599..c74d8c4f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -104,7 +104,7 @@ jobs:
- name: Setup ccache
if: runner.os != 'Windows' && inputs.build_type == 'Debug'
- uses: hendrikmuhs/ccache-action@v1.2.3
+ uses: hendrikmuhs/ccache-action@v1.2.4
with:
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
--
cgit
From c6ab9718aea56ef2cfbe23856396fdb46d16ab75 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 3 Nov 2022 19:50:27 +0000
Subject: chore(deps): update hendrikmuhs/ccache-action action to v1.2.5
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index c74d8c4f..ba8f9d38 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -104,7 +104,7 @@ jobs:
- name: Setup ccache
if: runner.os != 'Windows' && inputs.build_type == 'Debug'
- uses: hendrikmuhs/ccache-action@v1.2.4
+ uses: hendrikmuhs/ccache-action@v1.2.5
with:
key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
--
cgit