summaryrefslogtreecommitdiffstats
path: root/application/dialogs
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/dialogs
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/dialogs')
-rw-r--r--application/dialogs/LoginDialog.cpp8
-rw-r--r--application/dialogs/ProgressDialog.cpp4
-rw-r--r--application/dialogs/ProgressDialog.h10
3 files changed, 11 insertions, 11 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;
};