NOISSUE merging of strategy into profile, onesix into minecraft
This commit is contained in:
		@@ -28,6 +28,7 @@
 | 
			
		||||
#include "minecraft/ModList.h"
 | 
			
		||||
#include "minecraft/Mod.h"
 | 
			
		||||
#include "minecraft/VersionFilterData.h"
 | 
			
		||||
#include "minecraft/MinecraftProfile.h"
 | 
			
		||||
#include <DesktopServices.h>
 | 
			
		||||
 | 
			
		||||
ModFolderPage::ModFolderPage(BaseInstance *inst, std::shared_ptr<ModList> mods, QString id,
 | 
			
		||||
@@ -99,7 +100,7 @@ bool CoreModFolderPage::shouldDisplay() const
 | 
			
		||||
{
 | 
			
		||||
	if (ModFolderPage::shouldDisplay())
 | 
			
		||||
	{
 | 
			
		||||
		auto inst = dynamic_cast<OneSixInstance *>(m_inst);
 | 
			
		||||
		auto inst = dynamic_cast<MinecraftInstance *>(m_inst);
 | 
			
		||||
		if (!inst)
 | 
			
		||||
			return true;
 | 
			
		||||
		auto version = inst->getMinecraftProfile();
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
 | 
			
		||||
#include "minecraft/onesix/OneSixInstance.h"
 | 
			
		||||
#include "minecraft/MinecraftInstance.h"
 | 
			
		||||
#include "BasePage.h"
 | 
			
		||||
#include <MultiMC.h>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -50,13 +50,13 @@ class IconProxy : public QIdentityProxyModel
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
public:
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	IconProxy(QWidget *parentWidget) : QIdentityProxyModel(parentWidget)
 | 
			
		||||
	{
 | 
			
		||||
		connect(parentWidget, &QObject::destroyed, this, &IconProxy::widgetGone);
 | 
			
		||||
		m_parentWidget = parentWidget;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	virtual QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const override
 | 
			
		||||
	{
 | 
			
		||||
		QVariant var = QIdentityProxyModel::data(mapToSource(proxyIndex), role);
 | 
			
		||||
@@ -103,7 +103,7 @@ void VersionPage::setParentContainer(BasePageContainer * container)
 | 
			
		||||
	m_container = container;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
VersionPage::VersionPage(OneSixInstance *inst, QWidget *parent)
 | 
			
		||||
VersionPage::VersionPage(MinecraftInstance *inst, QWidget *parent)
 | 
			
		||||
	: QWidget(parent), ui(new Ui::VersionPage), m_inst(inst)
 | 
			
		||||
{
 | 
			
		||||
	ui->setupUi(this);
 | 
			
		||||
@@ -130,7 +130,7 @@ VersionPage::VersionPage(OneSixInstance *inst, QWidget *parent)
 | 
			
		||||
	{
 | 
			
		||||
		disableVersionControls();
 | 
			
		||||
	}
 | 
			
		||||
	connect(m_inst, &OneSixInstance::versionReloaded, this,
 | 
			
		||||
	connect(m_inst, &MinecraftInstance::versionReloaded, this,
 | 
			
		||||
			&VersionPage::updateVersionControls);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -381,8 +381,8 @@ void VersionPage::on_forgeBtn_clicked()
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	VersionSelectDialog vselect(vlist.get(), tr("Select Forge version"), this);
 | 
			
		||||
	vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_inst->currentVersionId());
 | 
			
		||||
	vselect.setEmptyString(tr("No Forge versions are currently available for Minecraft ") + m_inst->currentVersionId());
 | 
			
		||||
	vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_inst->getComponentVersion("net.minecraft"));
 | 
			
		||||
	vselect.setEmptyString(tr("No Forge versions are currently available for Minecraft ") + m_inst->getComponentVersion("net.minecraft"));
 | 
			
		||||
	vselect.setEmptyErrorString(tr("Couldn't load or download the Forge version lists!"));
 | 
			
		||||
	if (vselect.exec() && vselect.selectedVersion())
 | 
			
		||||
	{
 | 
			
		||||
@@ -403,8 +403,8 @@ void VersionPage::on_liteloaderBtn_clicked()
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	VersionSelectDialog vselect(vlist.get(), tr("Select LiteLoader version"), this);
 | 
			
		||||
	vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_inst->currentVersionId());
 | 
			
		||||
	vselect.setEmptyString(tr("No LiteLoader versions are currently available for Minecraft ") + m_inst->currentVersionId());
 | 
			
		||||
	vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_inst->getComponentVersion("net.minecraft"));
 | 
			
		||||
	vselect.setEmptyString(tr("No LiteLoader versions are currently available for Minecraft ") + m_inst->getComponentVersion("net.minecraft"));
 | 
			
		||||
	vselect.setEmptyErrorString(tr("Couldn't load or download the LiteLoader version lists!"));
 | 
			
		||||
	if (vselect.exec() && vselect.selectedVersion())
 | 
			
		||||
	{
 | 
			
		||||
@@ -548,3 +548,4 @@ void VersionPage::on_revertBtn_clicked()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#include "VersionPage.moc"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,8 @@
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
 | 
			
		||||
#include "minecraft/onesix/OneSixInstance.h"
 | 
			
		||||
#include "minecraft/MinecraftInstance.h"
 | 
			
		||||
#include "minecraft/MinecraftProfile.h"
 | 
			
		||||
#include "BasePage.h"
 | 
			
		||||
 | 
			
		||||
namespace Ui
 | 
			
		||||
@@ -30,7 +31,7 @@ class VersionPage : public QWidget, public BasePage
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	explicit VersionPage(OneSixInstance *inst, QWidget *parent = 0);
 | 
			
		||||
	explicit VersionPage(MinecraftInstance *inst, QWidget *parent = 0);
 | 
			
		||||
	virtual ~VersionPage();
 | 
			
		||||
	virtual QString displayName() const override
 | 
			
		||||
	{
 | 
			
		||||
@@ -82,7 +83,7 @@ protected:
 | 
			
		||||
private:
 | 
			
		||||
	Ui::VersionPage *ui;
 | 
			
		||||
	std::shared_ptr<MinecraftProfile> m_profile;
 | 
			
		||||
	OneSixInstance *m_inst;
 | 
			
		||||
	MinecraftInstance *m_inst;
 | 
			
		||||
	int currentIdx = 0;
 | 
			
		||||
	BasePageContainer * m_container = nullptr;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
 | 
			
		||||
#include "minecraft/onesix/OneSixInstance.h"
 | 
			
		||||
#include "minecraft/MinecraftInstance.h"
 | 
			
		||||
#include "BasePage.h"
 | 
			
		||||
#include <MultiMC.h>
 | 
			
		||||
#include <LoggedProcess.h>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user