summaryrefslogtreecommitdiffstats
path: root/application/pages/VersionPage.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-07-24 09:01:37 +0200
committerPetr Mrázek <peterix@gmail.com>2017-09-09 19:19:05 +0200
commit13628e7a8260b9407b0d44069f5bc1ecab585f35 (patch)
tree162a0d8b597154c1a00c649d44b3bf8fd1e10d2b /application/pages/VersionPage.cpp
parentb29382c748353856053f07b4756fa98f854244e1 (diff)
downloadMultiMC-13628e7a8260b9407b0d44069f5bc1ecab585f35.tar
MultiMC-13628e7a8260b9407b0d44069f5bc1ecab585f35.tar.gz
MultiMC-13628e7a8260b9407b0d44069f5bc1ecab585f35.tar.lz
MultiMC-13628e7a8260b9407b0d44069f5bc1ecab585f35.tar.xz
MultiMC-13628e7a8260b9407b0d44069f5bc1ecab585f35.zip
NOISSUE merging of strategy into profile, onesix into minecraft
Diffstat (limited to 'application/pages/VersionPage.cpp')
-rw-r--r--application/pages/VersionPage.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/application/pages/VersionPage.cpp b/application/pages/VersionPage.cpp
index c280f98f..343e1d2a 100644
--- a/application/pages/VersionPage.cpp
+++ b/application/pages/VersionPage.cpp
@@ -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"
+