diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-09-06 18:16:56 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-09-06 19:03:05 +0200 |
commit | 20cb97a35af5097e9d3b2062c0dfcb5f2e5fff5c (patch) | |
tree | 56bf51e681f2e73590a549499bd83d7b505c39f8 /logic/tasks/Task.cpp | |
parent | 36efcf8d3c0cbd7823fc65569cfc2b011435db2c (diff) | |
download | MultiMC-20cb97a35af5097e9d3b2062c0dfcb5f2e5fff5c.tar MultiMC-20cb97a35af5097e9d3b2062c0dfcb5f2e5fff5c.tar.gz MultiMC-20cb97a35af5097e9d3b2062c0dfcb5f2e5fff5c.tar.lz MultiMC-20cb97a35af5097e9d3b2062c0dfcb5f2e5fff5c.tar.xz MultiMC-20cb97a35af5097e9d3b2062c0dfcb5f2e5fff5c.zip |
Sync from quickmods
Diffstat (limited to 'logic/tasks/Task.cpp')
-rw-r--r-- | logic/tasks/Task.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/logic/tasks/Task.cpp b/logic/tasks/Task.cpp index c980d6b3..f7a99cdf 100644 --- a/logic/tasks/Task.cpp +++ b/logic/tasks/Task.cpp @@ -20,29 +20,16 @@ Task::Task(QObject *parent) : ProgressProvider(parent) { } -QString Task::getStatus() const -{ - return m_statusString; -} - void Task::setStatus(const QString &new_status) { - m_statusString = new_status; emit status(new_status); } void Task::setProgress(int new_progress) { - m_progress = new_progress; emit progress(new_progress, 100); } -void Task::getProgress(qint64 ¤t, qint64 &total) -{ - current = m_progress; - total = 100; -} - void Task::start() { m_running = true; @@ -61,6 +48,7 @@ void Task::emitFailed(QString reason) void Task::emitSucceeded() { + if (!m_running) { return; } // Don't succeed twice. m_running = false; m_succeeded = true; QLOG_INFO() << "Task succeeded"; |