diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-09-18 00:08:42 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-09-18 00:08:42 +0200 |
commit | 930b07afd4229e952d0cd47ca62cd94235499a0c (patch) | |
tree | 34cd74c3652da4b3ad0fd008faa2ab67adb4901f /gui/newinstancedialog.cpp | |
parent | 5cd3420c46e0b54f1479ddf720a8c9131c460a5e (diff) | |
parent | b979d0ce5da515793a02802a6421ef607a498323 (diff) | |
download | MultiMC-930b07afd4229e952d0cd47ca62cd94235499a0c.tar MultiMC-930b07afd4229e952d0cd47ca62cd94235499a0c.tar.gz MultiMC-930b07afd4229e952d0cd47ca62cd94235499a0c.tar.lz MultiMC-930b07afd4229e952d0cd47ca62cd94235499a0c.tar.xz MultiMC-930b07afd4229e952d0cd47ca62cd94235499a0c.zip |
Merge branch 'feature_library_model' into develop
Diffstat (limited to 'gui/newinstancedialog.cpp')
-rw-r--r-- | gui/newinstancedialog.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/newinstancedialog.cpp b/gui/newinstancedialog.cpp index ac3bcd7d..6604d03b 100644 --- a/gui/newinstancedialog.cpp +++ b/gui/newinstancedialog.cpp @@ -18,13 +18,13 @@ #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" #include "versionselectdialog.h" -#include "taskdialog.h" +#include "ProgressDialog.h" #include "IconPickerDialog.h" #include <QLayout> @@ -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); } |