summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-26 23:04:50 +0200
committerPetr Mrázek <peterix@gmail.com>2015-04-26 23:04:50 +0200
commitf8650e3965582a57c3d0ccb5f234e6229051b16a (patch)
treef815fc22ae303e0ebe491a5d38b3f09c94da948d /application
parent84549ed8078bdbd029aa5a89facc0412b8b5e753 (diff)
downloadMultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar
MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar.gz
MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar.lz
MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.tar.xz
MultiMC-f8650e3965582a57c3d0ccb5f234e6229051b16a.zip
NOISSUE eliminate ProgressProvider
Diffstat (limited to 'application')
-rw-r--r--application/dialogs/LoginDialog.cpp8
-rw-r--r--application/dialogs/ProgressDialog.cpp4
-rw-r--r--application/dialogs/ProgressDialog.h10
-rw-r--r--application/pages/InstanceSettingsPage.h1
-rw-r--r--application/pages/LegacyUpgradePage.h1
-rw-r--r--application/pages/LogPage.h1
-rw-r--r--application/pages/ModFolderPage.h1
-rw-r--r--application/pages/NotesPage.h1
-rw-r--r--application/pages/VersionPage.h2
9 files changed, 11 insertions, 18 deletions
diff --git a/application/dialogs/LoginDialog.cpp b/application/dialogs/LoginDialog.cpp
index 3af5c702..7e0f7df8 100644
--- a/application/dialogs/LoginDialog.cpp
+++ b/application/dialogs/LoginDialog.cpp
@@ -44,11 +44,11 @@ void LoginDialog::accept()
// Setup the login task and start it
m_account = MojangAccount::createFromUsername(ui->userTextBox->text());
m_loginTask = m_account->login(nullptr, ui->passTextBox->text());
- connect(m_loginTask.get(), &ProgressProvider::failed, this, &LoginDialog::onTaskFailed);
- connect(m_loginTask.get(), &ProgressProvider::succeeded, this,
+ connect(m_loginTask.get(), &Task::failed, this, &LoginDialog::onTaskFailed);
+ connect(m_loginTask.get(), &Task::succeeded, this,
&LoginDialog::onTaskSucceeded);
- connect(m_loginTask.get(), &ProgressProvider::status, this, &LoginDialog::onTaskStatus);
- connect(m_loginTask.get(), &ProgressProvider::progress, this, &LoginDialog::onTaskProgress);
+ connect(m_loginTask.get(), &Task::status, this, &LoginDialog::onTaskStatus);
+ connect(m_loginTask.get(), &Task::progress, this, &LoginDialog::onTaskProgress);
m_loginTask->start();
}
diff --git a/application/dialogs/ProgressDialog.cpp b/application/dialogs/ProgressDialog.cpp
index 61ebaa28..9a437d7a 100644
--- a/application/dialogs/ProgressDialog.cpp
+++ b/application/dialogs/ProgressDialog.cpp
@@ -54,7 +54,7 @@ void ProgressDialog::updateSize()
resize(QSize(480, minimumSizeHint().height()));
}
-int ProgressDialog::exec(ProgressProvider *task)
+int ProgressDialog::exec(Task *task)
{
this->task = task;
@@ -74,7 +74,7 @@ int ProgressDialog::exec(ProgressProvider *task)
return QDialog::Accepted;
}
-ProgressProvider *ProgressDialog::getTask()
+Task *ProgressDialog::getTask()
{
return task;
}
diff --git a/application/dialogs/ProgressDialog.h b/application/dialogs/ProgressDialog.h
index d5153680..fb80d0ce 100644
--- a/application/dialogs/ProgressDialog.h
+++ b/application/dialogs/ProgressDialog.h
@@ -17,7 +17,7 @@
#include <QDialog>
-class ProgressProvider;
+class Task;
namespace Ui
{
@@ -34,11 +34,11 @@ public:
void updateSize();
- int exec(ProgressProvider *task);
+ int exec(Task *task);
void setSkipButton(bool present, QString label = QString());
- ProgressProvider *getTask();
+ Task *getTask();
public
slots:
@@ -49,7 +49,7 @@ slots:
void changeStatus(const QString &status);
void changeProgress(qint64 current, qint64 total);
-
+
private
slots:
void on_skipButton_clicked(bool checked);
@@ -61,5 +61,5 @@ protected:
private:
Ui::ProgressDialog *ui;
- ProgressProvider *task;
+ Task *task;
};
diff --git a/application/pages/InstanceSettingsPage.h b/application/pages/InstanceSettingsPage.h
index 85df5880..60cc1898 100644
--- a/application/pages/InstanceSettingsPage.h
+++ b/application/pages/InstanceSettingsPage.h
@@ -17,7 +17,6 @@
#include <QWidget>
-#include "net/NetJob.h"
#include "java/JavaChecker.h"
#include "BaseInstance.h"
#include "BasePage.h"
diff --git a/application/pages/LegacyUpgradePage.h b/application/pages/LegacyUpgradePage.h
index 108b1024..f39bff95 100644
--- a/application/pages/LegacyUpgradePage.h
+++ b/application/pages/LegacyUpgradePage.h
@@ -18,7 +18,6 @@
#include <QWidget>
#include "minecraft/OneSixInstance.h"
-#include "net/NetJob.h"
#include "pages/BasePage.h"
#include <MultiMC.h>
diff --git a/application/pages/LogPage.h b/application/pages/LogPage.h
index fe7bbecb..e28c9690 100644
--- a/application/pages/LogPage.h
+++ b/application/pages/LogPage.h
@@ -18,7 +18,6 @@
#include <QWidget>
#include "BaseInstance.h"
-#include "net/NetJob.h"
#include "BaseProcess.h"
#include "BasePage.h"
#include <MultiMC.h>
diff --git a/application/pages/ModFolderPage.h b/application/pages/ModFolderPage.h
index 4e89f85f..864125be 100644
--- a/application/pages/ModFolderPage.h
+++ b/application/pages/ModFolderPage.h
@@ -18,7 +18,6 @@
#include <QWidget>
#include "minecraft/OneSixInstance.h"
-#include "net/NetJob.h"
#include "BasePage.h"
#include <MultiMC.h>
diff --git a/application/pages/NotesPage.h b/application/pages/NotesPage.h
index 62e0c692..e9e5aa48 100644
--- a/application/pages/NotesPage.h
+++ b/application/pages/NotesPage.h
@@ -18,7 +18,6 @@
#include <QWidget>
#include "BaseInstance.h"
-#include "net/NetJob.h"
#include "BasePage.h"
#include <MultiMC.h>
diff --git a/application/pages/VersionPage.h b/application/pages/VersionPage.h
index 587fcf07..d115d8f8 100644
--- a/application/pages/VersionPage.h
+++ b/application/pages/VersionPage.h
@@ -18,7 +18,6 @@
#include <QWidget>
#include "minecraft/OneSixInstance.h"
-#include "net/NetJob.h"
#include "BasePage.h"
namespace Ui
@@ -72,7 +71,6 @@ private:
Ui::VersionPage *ui;
std::shared_ptr<MinecraftProfile> m_version;
OneSixInstance *m_inst;
- NetJobPtr forgeJob;
public
slots: