Remove pointless const_cast in ProgressWidget
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
@@ -39,7 +39,7 @@ void ProgressWidget::progressFormat(QString format)
|
||||
m_bar->setFormat(format);
|
||||
}
|
||||
|
||||
void ProgressWidget::watch(const Task* task)
|
||||
void ProgressWidget::watch(Task* task)
|
||||
{
|
||||
if (!task)
|
||||
return;
|
||||
@@ -61,11 +61,11 @@ void ProgressWidget::watch(const Task* task)
|
||||
connect(m_task, &Task::started, this, &ProgressWidget::show);
|
||||
}
|
||||
|
||||
void ProgressWidget::start(const Task* task)
|
||||
void ProgressWidget::start(Task* task)
|
||||
{
|
||||
watch(task);
|
||||
if (!m_task->isRunning())
|
||||
QMetaObject::invokeMethod(const_cast<Task*>(m_task), "start", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(m_task, "start", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
bool ProgressWidget::exec(std::shared_ptr<Task> task)
|
||||
|
||||
Reference in New Issue
Block a user