summaryrefslogtreecommitdiffstats
path: root/logic/tasks/Task.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/tasks/Task.cpp')
-rw-r--r--logic/tasks/Task.cpp14
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 &current, 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";