diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-16 00:54:39 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-16 00:54:39 +0200 |
commit | d38b90530b3ba3a49c4eb072eb344ae2b0836913 (patch) | |
tree | 5dd07e59ae1bc8392a773ec8fec6b6a3aa7e4840 /gui/newinstancedialog.cpp | |
parent | 7721c57e5e1093a3d8597b6b6f30c97d2aa3d8a5 (diff) | |
download | MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.gz MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.lz MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.xz MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.zip |
Forge version list implementation. Needs integration and testing.
Diffstat (limited to 'gui/newinstancedialog.cpp')
-rw-r--r-- | gui/newinstancedialog.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gui/newinstancedialog.cpp b/gui/newinstancedialog.cpp index ac3bcd7d..af2b11c5 100644 --- a/gui/newinstancedialog.cpp +++ b/gui/newinstancedialog.cpp @@ -18,7 +18,7 @@ #include "ui_newinstancedialog.h" #include "logic/InstanceFactory.h" -#include "logic/InstanceVersion.h" +#include "logic/BaseVersion.h" #include "logic/lists/IconList.h" #include "logic/lists/MinecraftVersionList.h" #include "logic/tasks/Task.h" @@ -48,7 +48,7 @@ NewInstanceDialog::NewInstanceDialog(QWidget *parent) : taskDlg->exec(loadTask); } */ - setSelectedVersion(MinecraftVersionList::getMainList().getLatestStable()); + setSelectedVersion(MMC->minecraftlist()->getLatestStable()); InstIconKey = "infinity"; ui->iconButton->setIcon(MMC->icons()->getIcon(InstIconKey)); } @@ -63,13 +63,13 @@ void NewInstanceDialog::updateDialogState() ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!instName().isEmpty() && m_selectedVersion); } -void NewInstanceDialog::setSelectedVersion(InstVersionPtr version) +void NewInstanceDialog::setSelectedVersion(BaseVersionPtr version) { m_selectedVersion = version; if (m_selectedVersion) { - ui->versionTextBox->setText(version->name); + ui->versionTextBox->setText(version->name()); } else { @@ -89,18 +89,18 @@ QString NewInstanceDialog::iconKey() const return InstIconKey; } -InstVersionPtr NewInstanceDialog::selectedVersion() const +BaseVersionPtr NewInstanceDialog::selectedVersion() const { return m_selectedVersion; } void NewInstanceDialog::on_btnChangeVersion_clicked() { - VersionSelectDialog vselect(&MinecraftVersionList::getMainList(), this); + VersionSelectDialog vselect(MMC->minecraftlist(), this); vselect.exec(); if (vselect.result() == QDialog::Accepted) { - InstVersionPtr version = vselect.selectedVersion(); + BaseVersionPtr version = vselect.selectedVersion(); if (version) setSelectedVersion(version); } |