summaryrefslogtreecommitdiffstats
path: root/gui/OneSixModEditDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-10-06 01:13:40 +0200
committerPetr Mrázek <peterix@gmail.com>2013-10-06 01:13:40 +0200
commitf83119ce7ec3d11a903901b8eff762d2b0a9f635 (patch)
tree5c30d7b9fff0f9417e7f2cd79d8ad9ea56d7f056 /gui/OneSixModEditDialog.cpp
parenteba9b3d759dbf6e402e91ab897059f1d274aef90 (diff)
downloadMultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar.gz
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar.lz
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.tar.xz
MultiMC-f83119ce7ec3d11a903901b8eff762d2b0a9f635.zip
Added file logger
Diffstat (limited to 'gui/OneSixModEditDialog.cpp')
-rw-r--r--gui/OneSixModEditDialog.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/gui/OneSixModEditDialog.cpp b/gui/OneSixModEditDialog.cpp
index f2e7c5d2..e8c7f9ed 100644
--- a/gui/OneSixModEditDialog.cpp
+++ b/gui/OneSixModEditDialog.cpp
@@ -42,7 +42,7 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
{
main_model = new EnabledItemFilter(this);
main_model->setActive(true);
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
ui->libraryTreeView->setModel(main_model);
ui->libraryTreeView->installEventFilter(this);
ui->mainClassEdit->setText(m_version->mainClass);
@@ -56,7 +56,7 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
{
ensureFolderPathExists(m_inst->loaderModsDir());
m_mods = m_inst->loaderModList();
- ui->loaderModTreeView->setModel(m_mods.data());
+ ui->loaderModTreeView->setModel(m_mods.get());
ui->loaderModTreeView->installEventFilter(this);
m_mods->startWatching();
}
@@ -64,7 +64,7 @@ OneSixModEditDialog::OneSixModEditDialog(OneSixInstance *inst, QWidget *parent)
{
ensureFolderPathExists(m_inst->resourcePacksDir());
m_resourcepacks = m_inst->resourcePackList();
- ui->resPackTreeView->setModel(m_resourcepacks.data());
+ ui->resPackTreeView->setModel(m_resourcepacks.get());
ui->resPackTreeView->installEventFilter(this);
m_resourcepacks->startWatching();
}
@@ -97,7 +97,7 @@ void OneSixModEditDialog::on_customizeBtn_clicked()
if (m_inst->customizeVersion())
{
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
}
@@ -113,7 +113,7 @@ void OneSixModEditDialog::on_revertBtn_clicked()
if (m_inst->revertCustomVersion())
{
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
}
@@ -121,7 +121,7 @@ void OneSixModEditDialog::on_revertBtn_clicked()
void OneSixModEditDialog::on_forgeBtn_clicked()
{
- VersionSelectDialog vselect(MMC->forgelist().data(), this);
+ VersionSelectDialog vselect(MMC->forgelist().get(), this);
vselect.setFilter(1, m_inst->currentVersionId());
if (vselect.exec() && vselect.selectedVersion())
{
@@ -139,7 +139,7 @@ void OneSixModEditDialog::on_forgeBtn_clicked()
m_inst->customizeVersion();
{
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
}
@@ -150,10 +150,11 @@ void OneSixModEditDialog::on_forgeBtn_clicked()
{
m_inst->customizeVersion();
m_version = m_inst->getFullVersion();
- main_model->setSourceModel(m_version.data());
+ main_model->setSourceModel(m_version.get());
updateVersionControls();
}
- ForgeVersionPtr forgeVersion = vselect.selectedVersion().dynamicCast<ForgeVersion>();
+ ForgeVersionPtr forgeVersion =
+ std::dynamic_pointer_cast<ForgeVersion>(vselect.selectedVersion());
if (!forgeVersion)
return;
auto entry = MMC->metacache()->resolveEntry("minecraftforge", forgeVersion->filename);