diff --git a/src/dialogs/AsyncTaskDialog.cpp b/src/dialogs/AsyncTaskDialog.cpp index 87ce3c49..3742e5bc 100644 --- a/src/dialogs/AsyncTaskDialog.cpp +++ b/src/dialogs/AsyncTaskDialog.cpp @@ -23,7 +23,7 @@ AsyncTaskDialog::AsyncTaskDialog(AsyncTask *task, QWidget *parent) close(); }); - updateLog(); + updateLog(task->getLog()); connect(&timer, SIGNAL(timeout()), this, SLOT(updateProgressTimer())); timer.setInterval(1000); @@ -37,9 +37,9 @@ AsyncTaskDialog::~AsyncTaskDialog() { } -void AsyncTaskDialog::updateLog() +void AsyncTaskDialog::updateLog(const QString &log) { - ui->logTextEdit->setPlainText(task->getLog()); + ui->logTextEdit->setPlainText(log); } void AsyncTaskDialog::updateProgressTimer() diff --git a/src/dialogs/AsyncTaskDialog.h b/src/dialogs/AsyncTaskDialog.h index b5cf3c5a..ed8c08dc 100644 --- a/src/dialogs/AsyncTaskDialog.h +++ b/src/dialogs/AsyncTaskDialog.h @@ -25,7 +25,7 @@ public slots: void reject() override; private slots: - void updateLog(); + void updateLog(const QString &log); void updateProgressTimer(); protected: