Fix valgrind issues

This commit is contained in:
Jan Käberich 2021-12-10 20:46:04 +01:00
parent 1c6a1ab6fd
commit 75f4ee245f
16 changed files with 70 additions and 8 deletions

View file

@ -37,6 +37,9 @@ void Math::Expression::edit()
auto d = new QDialog();
auto ui = new Ui::ExpressionDialog;
ui->setupUi(d);
connect(d, &QDialog::finished, [=](){
delete ui;
});
ui->expEdit->setText(exp);
connect(ui->buttonBox, &QDialogButtonBox::accepted, [=](){
exp = ui->expEdit->text();
@ -57,6 +60,9 @@ QWidget *Math::Expression::createExplanationWidget()
auto w = new QWidget();
auto ui = new Ui::ExpressionExplanationWidget;
ui->setupUi(w);
connect(w, &QWidget::destroyed, [=](){
delete ui;
});
return w;
}