diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-07-24 01:24:06 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-07-28 22:12:57 +0200 |
commit | 9965decd81b8e8ca98d610f605263ccf4ce541e1 (patch) | |
tree | 48a8402d2d0c6dc27101476ef0e7ca8fb5ff9307 /application | |
parent | 9e7cdbfe1183f7124308d4468104d26feb4a017d (diff) | |
download | MultiMC-9965decd81b8e8ca98d610f605263ccf4ce541e1.tar MultiMC-9965decd81b8e8ca98d610f605263ccf4ce541e1.tar.gz MultiMC-9965decd81b8e8ca98d610f605263ccf4ce541e1.tar.lz MultiMC-9965decd81b8e8ca98d610f605263ccf4ce541e1.tar.xz MultiMC-9965decd81b8e8ca98d610f605263ccf4ce541e1.zip |
NOISSUE squish.
Diffstat (limited to 'application')
-rw-r--r-- | application/MainWindow.cpp | 11 | ||||
-rw-r--r-- | application/MultiMC.cpp | 7 | ||||
-rw-r--r-- | application/pages/instance/LegacyUpgradePage.cpp | 4 | ||||
-rw-r--r-- | application/pages/modplatform/FTBPage.cpp | 1 | ||||
-rw-r--r-- | application/pages/modplatform/ImportPage.cpp | 3 | ||||
-rw-r--r-- | application/pages/modplatform/TechnicPage.cpp | 3 | ||||
-rw-r--r-- | application/pages/modplatform/TwitchPage.cpp | 3 | ||||
-rw-r--r-- | application/pages/modplatform/VanillaPage.cpp | 3 |
8 files changed, 6 insertions, 29 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index a84af880..9a1efb2b 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -86,7 +86,6 @@ #include "dialogs/EditAccountDialog.h" #include "dialogs/NotificationDialog.h" #include "dialogs/ExportInstanceDialog.h" -#include <FolderInstanceProvider.h> #include <InstanceImportTask.h> #include "UpdateController.h" #include "KonamiCode.h" @@ -1279,11 +1278,8 @@ void MainWindow::runModalTask(Task *task) void MainWindow::instanceFromInstanceTask(InstanceTask *rawTask) { - std::unique_ptr<Task> task(MMC->folderProvider()->wrapInstanceTask(rawTask)); + std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(rawTask)); runModalTask(task.get()); - - // FIXME: handle instance selection after creation - // finalizeInstance(newInstance); } void MainWindow::on_actionCopyInstance_triggered() @@ -1299,11 +1295,8 @@ void MainWindow::on_actionCopyInstance_triggered() copyTask->setName(copyInstDlg.instName()); copyTask->setGroup(copyInstDlg.instGroup()); copyTask->setIcon(copyInstDlg.iconKey()); - std::unique_ptr<Task> task(MMC->folderProvider()->wrapInstanceTask(copyTask)); + std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(copyTask)); runModalTask(task.get()); - - // FIXME: handle instance selection after creation - // finalizeInstance(newInstance); } void MainWindow::finalizeInstance(InstancePtr inst) diff --git a/application/MultiMC.cpp b/application/MultiMC.cpp index 191f52fe..3a9c281e 100644 --- a/application/MultiMC.cpp +++ b/application/MultiMC.cpp @@ -36,7 +36,6 @@ #include "dialogs/CustomMessageBox.h" #include "InstanceList.h" -#include "FolderInstanceProvider.h" #include <minecraft/auth/MojangAccountList.h> #include "icons/IconList.h" @@ -597,10 +596,8 @@ MultiMC::MultiMC(int &argc, char **argv) : QApplication(argc, argv) { qWarning() << "Your instance path contains \'!\' and this is known to cause java problems"; } - m_instances.reset(new InstanceList(this)); - m_instanceFolder = new FolderInstanceProvider(m_settings, instDir); - connect(InstDirSetting.get(), &Setting::SettingChanged, m_instanceFolder, &FolderInstanceProvider::on_InstFolderChanged); - m_instances->addInstanceProvider(m_instanceFolder); + m_instances.reset(new InstanceList(m_settings, instDir, this)); + connect(InstDirSetting.get(), &Setting::SettingChanged, m_instances.get(), &InstanceList::on_InstFolderChanged); qDebug() << "Loading Instances..."; m_instances->loadList(); qDebug() << "<> Instances loaded."; diff --git a/application/pages/instance/LegacyUpgradePage.cpp b/application/pages/instance/LegacyUpgradePage.cpp index 7cd29a62..0d2e5996 100644 --- a/application/pages/instance/LegacyUpgradePage.cpp +++ b/application/pages/instance/LegacyUpgradePage.cpp @@ -1,10 +1,10 @@ #include "LegacyUpgradePage.h" #include "ui_LegacyUpgradePage.h" +#include "InstanceList.h" #include "minecraft/legacy/LegacyInstance.h" #include "minecraft/legacy/LegacyUpgradeTask.h" #include "MultiMC.h" -#include "FolderInstanceProvider.h" #include "dialogs/CustomMessageBox.h" #include "dialogs/ProgressDialog.h" @@ -40,7 +40,7 @@ void LegacyUpgradePage::on_upgradeButton_clicked() upgradeTask->setName(newName); upgradeTask->setGroup(m_inst->group()); upgradeTask->setIcon(m_inst->iconKey()); - std::unique_ptr<Task> task(MMC->folderProvider()->wrapInstanceTask(upgradeTask)); + std::unique_ptr<Task> task(MMC->instances()->wrapInstanceTask(upgradeTask)); runModalTask(task.get()); } diff --git a/application/pages/modplatform/FTBPage.cpp b/application/pages/modplatform/FTBPage.cpp index ae4dd92e..1884bbfb 100644 --- a/application/pages/modplatform/FTBPage.cpp +++ b/application/pages/modplatform/FTBPage.cpp @@ -2,7 +2,6 @@ #include "ui_FTBPage.h" #include "MultiMC.h" -#include "FolderInstanceProvider.h" #include "dialogs/CustomMessageBox.h" #include "dialogs/NewInstanceDialog.h" #include "modplatform/ftb/FtbPackFetchTask.h" diff --git a/application/pages/modplatform/ImportPage.cpp b/application/pages/modplatform/ImportPage.cpp index 5e476195..3cd7c2cf 100644 --- a/application/pages/modplatform/ImportPage.cpp +++ b/application/pages/modplatform/ImportPage.cpp @@ -2,9 +2,6 @@ #include "ui_ImportPage.h" #include "MultiMC.h" -#include "FolderInstanceProvider.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/ProgressDialog.h" #include "dialogs/NewInstanceDialog.h" #include <QFileDialog> #include <QValidator> diff --git a/application/pages/modplatform/TechnicPage.cpp b/application/pages/modplatform/TechnicPage.cpp index 1ee3ca9e..2f95bec8 100644 --- a/application/pages/modplatform/TechnicPage.cpp +++ b/application/pages/modplatform/TechnicPage.cpp @@ -2,9 +2,6 @@ #include "ui_TechnicPage.h" #include "MultiMC.h" -#include "FolderInstanceProvider.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/ProgressDialog.h" #include "dialogs/NewInstanceDialog.h" TechnicPage::TechnicPage(NewInstanceDialog* dialog, QWidget *parent) diff --git a/application/pages/modplatform/TwitchPage.cpp b/application/pages/modplatform/TwitchPage.cpp index f9b326ae..a984c01c 100644 --- a/application/pages/modplatform/TwitchPage.cpp +++ b/application/pages/modplatform/TwitchPage.cpp @@ -2,9 +2,6 @@ #include "ui_TwitchPage.h" #include "MultiMC.h" -#include "FolderInstanceProvider.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/ProgressDialog.h" #include "dialogs/NewInstanceDialog.h" TwitchPage::TwitchPage(NewInstanceDialog* dialog, QWidget *parent) diff --git a/application/pages/modplatform/VanillaPage.cpp b/application/pages/modplatform/VanillaPage.cpp index f0f2a95e..77362fcc 100644 --- a/application/pages/modplatform/VanillaPage.cpp +++ b/application/pages/modplatform/VanillaPage.cpp @@ -2,9 +2,6 @@ #include "ui_VanillaPage.h" #include "MultiMC.h" -#include "FolderInstanceProvider.h" -#include "dialogs/CustomMessageBox.h" -#include "dialogs/ProgressDialog.h" #include <meta/Index.h> #include <meta/VersionList.h> |