mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 03:16:10 +00:00
Fix Memory Bug in AsyncTaskDialog
This commit is contained in:
parent
5dbaefb176
commit
39eee858e6
@ -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()
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user