summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-10-11 23:04:24 +0200
committerPetr Mrázek <peterix@gmail.com>2017-11-04 15:23:49 +0100
commitfede712a26937c5c0815cb9ed62320a8611794eb (patch)
tree1e881f91a01a235bf38710a795ad8add7a728208 /application
parent87edaa7dcd05db10399eda1b2769208a82a54cdf (diff)
downloadMultiMC-fede712a26937c5c0815cb9ed62320a8611794eb.tar
MultiMC-fede712a26937c5c0815cb9ed62320a8611794eb.tar.gz
MultiMC-fede712a26937c5c0815cb9ed62320a8611794eb.tar.lz
MultiMC-fede712a26937c5c0815cb9ed62320a8611794eb.tar.xz
MultiMC-fede712a26937c5c0815cb9ed62320a8611794eb.zip
NOISSUE rename MinecraftProfile to ComponentList
It is realistically a list of components. The fact that it also holds the final launch parameters is a design bug.
Diffstat (limited to 'application')
-rw-r--r--application/pages/ModFolderPage.cpp4
-rw-r--r--application/pages/VersionPage.cpp18
-rw-r--r--application/pages/VersionPage.h6
3 files changed, 14 insertions, 14 deletions
diff --git a/application/pages/ModFolderPage.cpp b/application/pages/ModFolderPage.cpp
index 422e1eb4..be1c8289 100644
--- a/application/pages/ModFolderPage.cpp
+++ b/application/pages/ModFolderPage.cpp
@@ -28,7 +28,7 @@
#include "minecraft/ModList.h"
#include "minecraft/Mod.h"
#include "minecraft/VersionFilterData.h"
-#include "minecraft/MinecraftProfile.h"
+#include "minecraft/ComponentList.h"
#include <DesktopServices.h>
ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods, QString id,
@@ -103,7 +103,7 @@ bool CoreModFolderPage::shouldDisplay() const
auto inst = dynamic_cast<MinecraftInstance *>(m_inst);
if (!inst)
return true;
- auto version = inst->getMinecraftProfile();
+ auto version = inst->getComponentList();
if (!version)
return true;
if(!version->versionPatch("net.minecraftforge"))
diff --git a/application/pages/VersionPage.cpp b/application/pages/VersionPage.cpp
index c915b42b..d65d6bc7 100644
--- a/application/pages/VersionPage.cpp
+++ b/application/pages/VersionPage.cpp
@@ -35,7 +35,7 @@
#include <QString>
#include <QUrl>
-#include "minecraft/MinecraftProfile.h"
+#include "minecraft/ComponentList.h"
#include "minecraft/auth/MojangAccountList.h"
#include "minecraft/Mod.h"
#include "icons/IconList.h"
@@ -104,9 +104,9 @@ VersionPage::VersionPage(MinecraftInstance *inst, QWidget *parent)
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
- reloadMinecraftProfile();
+ reloadComponentList();
- m_profile = m_inst->getMinecraftProfile();
+ m_profile = m_inst->getComponentList();
if (m_profile)
{
auto proxy = new IconProxy(ui->packageView);
@@ -192,7 +192,7 @@ void VersionPage::disableVersionControls()
updateButtons();
}
-bool VersionPage::reloadMinecraftProfile()
+bool VersionPage::reloadComponentList()
{
try
{
@@ -215,7 +215,7 @@ bool VersionPage::reloadMinecraftProfile()
void VersionPage::on_reloadBtn_clicked()
{
- reloadMinecraftProfile();
+ reloadComponentList();
m_container->refreshContainer();
}
@@ -230,7 +230,7 @@ void VersionPage::on_removeBtn_clicked()
}
}
updateButtons();
- reloadMinecraftProfile();
+ reloadComponentList();
m_container->refreshContainer();
}
@@ -279,7 +279,7 @@ void VersionPage::on_moveUpBtn_clicked()
{
try
{
- m_profile->move(currentRow(), MinecraftProfile::MoveUp);
+ m_profile->move(currentRow(), ComponentList::MoveUp);
}
catch (Exception &e)
{
@@ -292,7 +292,7 @@ void VersionPage::on_moveDownBtn_clicked()
{
try
{
- m_profile->move(currentRow(), MinecraftProfile::MoveDown);
+ m_profile->move(currentRow(), ComponentList::MoveDown);
}
catch (Exception &e)
{
@@ -345,7 +345,7 @@ void VersionPage::on_changeVersionBtn_clicked()
if (result != QMessageBox::Ok)
return;
m_profile->revertToVanilla();
- reloadMinecraftProfile();
+ reloadComponentList();
}
}
m_inst->setComponentVersion(uid, vselect.selectedVersion()->descriptor());
diff --git a/application/pages/VersionPage.h b/application/pages/VersionPage.h
index 0017be5c..0ac10a14 100644
--- a/application/pages/VersionPage.h
+++ b/application/pages/VersionPage.h
@@ -18,7 +18,7 @@
#include <QWidget>
#include "minecraft/MinecraftInstance.h"
-#include "minecraft/MinecraftProfile.h"
+#include "minecraft/ComponentList.h"
#include "BasePage.h"
namespace Ui
@@ -76,11 +76,11 @@ private:
protected:
/// FIXME: this shouldn't be necessary!
- bool reloadMinecraftProfile();
+ bool reloadComponentList();
private:
Ui::VersionPage *ui;
- std::shared_ptr<MinecraftProfile> m_profile;
+ std::shared_ptr<ComponentList> m_profile;
MinecraftInstance *m_inst;
int currentIdx = 0;