diff options
Diffstat (limited to 'application/pages/instance/LegacyUpgradePage.cpp')
-rw-r--r-- | application/pages/instance/LegacyUpgradePage.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/application/pages/instance/LegacyUpgradePage.cpp b/application/pages/instance/LegacyUpgradePage.cpp index f808ab88..7cd29a62 100644 --- a/application/pages/instance/LegacyUpgradePage.cpp +++ b/application/pages/instance/LegacyUpgradePage.cpp @@ -9,42 +9,42 @@ #include "dialogs/ProgressDialog.h" LegacyUpgradePage::LegacyUpgradePage(InstancePtr inst, QWidget *parent) - : QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst) + : QWidget(parent), ui(new Ui::LegacyUpgradePage), m_inst(inst) { - ui->setupUi(this); + ui->setupUi(this); } LegacyUpgradePage::~LegacyUpgradePage() { - delete ui; + delete ui; } void LegacyUpgradePage::runModalTask(Task *task) { - connect(task, &Task::failed, [this](QString reason) - { - CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Warning)->show(); - }); - ProgressDialog loadDialog(this); - loadDialog.setSkipButton(true, tr("Abort")); - if(loadDialog.execWithTask(task) == QDialog::Accepted) - { - m_container->requestClose(); - } + connect(task, &Task::failed, [this](QString reason) + { + CustomMessageBox::selectable(this, tr("Error"), reason, QMessageBox::Warning)->show(); + }); + ProgressDialog loadDialog(this); + loadDialog.setSkipButton(true, tr("Abort")); + if(loadDialog.execWithTask(task) == QDialog::Accepted) + { + m_container->requestClose(); + } } void LegacyUpgradePage::on_upgradeButton_clicked() { - QString newName = tr("%1 (Migrated)").arg(m_inst->name()); - auto upgradeTask = new LegacyUpgradeTask(m_inst); - upgradeTask->setName(newName); - upgradeTask->setGroup(m_inst->group()); - upgradeTask->setIcon(m_inst->iconKey()); - std::unique_ptr<Task> task(MMC->folderProvider()->wrapInstanceTask(upgradeTask)); - runModalTask(task.get()); + QString newName = tr("%1 (Migrated)").arg(m_inst->name()); + auto upgradeTask = new LegacyUpgradeTask(m_inst); + upgradeTask->setName(newName); + upgradeTask->setGroup(m_inst->group()); + upgradeTask->setIcon(m_inst->iconKey()); + std::unique_ptr<Task> task(MMC->folderProvider()->wrapInstanceTask(upgradeTask)); + runModalTask(task.get()); } bool LegacyUpgradePage::shouldDisplay() const { - return !m_inst->isRunning(); + return !m_inst->isRunning(); } |