Fix Memory Bug in AsyncTaskDialog

This commit is contained in:
Florian Märkl 2018-05-27 21:57:37 +02:00
parent 5dbaefb176
commit 39eee858e6
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ AsyncTaskDialog::AsyncTaskDialog(AsyncTask *task, QWidget *parent)
close(); close();
}); });
updateLog(); updateLog(task->getLog());
connect(&timer, SIGNAL(timeout()), this, SLOT(updateProgressTimer())); connect(&timer, SIGNAL(timeout()), this, SLOT(updateProgressTimer()));
timer.setInterval(1000); 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() void AsyncTaskDialog::updateProgressTimer()

View File

@ -25,7 +25,7 @@ public slots:
void reject() override; void reject() override;
private slots: private slots:
void updateLog(); void updateLog(const QString &log);
void updateProgressTimer(); void updateProgressTimer();
protected: protected: