diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-21 23:36:55 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-21 23:36:55 +0100 |
commit | 9fc677c2a4259c8b8421d0fd207770e8f524a09c (patch) | |
tree | 1e77aa4a073e6fc4958d6365fb02be4c49441ba4 /launcher/tasks | |
parent | 69213b1206e97f7d4db4270a4b3b0af41dc9e6fc (diff) | |
download | PrismLauncher-9fc677c2a4259c8b8421d0fd207770e8f524a09c.tar.gz PrismLauncher-9fc677c2a4259c8b8421d0fd207770e8f524a09c.tar.bz2 PrismLauncher-9fc677c2a4259c8b8421d0fd207770e8f524a09c.zip |
NOISSUE more refactoring
Diffstat (limited to 'launcher/tasks')
-rw-r--r-- | launcher/tasks/SequentialTask.cpp | 6 | ||||
-rw-r--r-- | launcher/tasks/SequentialTask.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/launcher/tasks/SequentialTask.cpp b/launcher/tasks/SequentialTask.cpp index f96f2cee..a66b9d78 100644 --- a/launcher/tasks/SequentialTask.cpp +++ b/launcher/tasks/SequentialTask.cpp @@ -4,7 +4,7 @@ SequentialTask::SequentialTask(QObject *parent) : Task(parent), m_currentIndex(- { } -void SequentialTask::addTask(shared_qobject_ptr<Task> task) +void SequentialTask::addTask(Task::Ptr task) { m_queue.append(task); } @@ -19,7 +19,7 @@ void SequentialTask::startNext() { if (m_currentIndex != -1) { - shared_qobject_ptr<Task> previous = m_queue[m_currentIndex]; + Task::Ptr previous = m_queue[m_currentIndex]; disconnect(previous.get(), 0, this, 0); } m_currentIndex++; @@ -28,7 +28,7 @@ void SequentialTask::startNext() emitSucceeded(); return; } - shared_qobject_ptr<Task> next = m_queue[m_currentIndex]; + Task::Ptr next = m_queue[m_currentIndex]; connect(next.get(), SIGNAL(failed(QString)), this, SLOT(subTaskFailed(QString))); connect(next.get(), SIGNAL(status(QString)), this, SLOT(subTaskStatus(QString))); connect(next.get(), SIGNAL(progress(qint64, qint64)), this, SLOT(subTaskProgress(qint64, qint64))); diff --git a/launcher/tasks/SequentialTask.h b/launcher/tasks/SequentialTask.h index e3091176..027744f3 100644 --- a/launcher/tasks/SequentialTask.h +++ b/launcher/tasks/SequentialTask.h @@ -12,7 +12,7 @@ public: explicit SequentialTask(QObject *parent = 0); virtual ~SequentialTask() {}; - void addTask(shared_qobject_ptr<Task> task); + void addTask(Task::Ptr task); protected: void executeTask(); @@ -25,6 +25,6 @@ slots: void subTaskProgress(qint64 current, qint64 total); private: - QQueue<shared_qobject_ptr<Task> > m_queue; + QQueue<Task::Ptr > m_queue; int m_currentIndex; }; |