mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +02:00
Merge pull request #519 from ispyisail/fix/asan-memory-leaks
Fix four memory leaks found by AddressSanitizer
This commit is contained in:
@@ -110,6 +110,9 @@ ElementScene::~ElementScene()
|
||||
|
||||
if (m_decorator)
|
||||
delete m_decorator;
|
||||
|
||||
if (m_paste_area && !m_paste_area->scene())
|
||||
delete m_paste_area;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -386,7 +386,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p,
|
||||
|
||||
outline_color->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
filling_color->setSizeAdjustPolicy(QComboBox::AdjustToContents);
|
||||
auto grid_layout = new QGridLayout(this);
|
||||
auto grid_layout = new QGridLayout();
|
||||
grid_layout->addWidget(new QLabel(tr("Contour :")), 0,0, Qt::AlignRight);
|
||||
grid_layout->addWidget(outline_color, 0, 1);
|
||||
grid_layout->addWidget(new QLabel(tr("Remplissage :")), 1, 0, Qt::AlignRight);
|
||||
|
||||
@@ -112,6 +112,7 @@ ExportDialog::ExportDialog(
|
||||
*/
|
||||
ExportDialog::~ExportDialog()
|
||||
{
|
||||
qDeleteAll(diagram_lines_);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -321,9 +321,11 @@ QTreeWidgetItem *GenericPanel::getItemForDiagram(Diagram *diagram,
|
||||
if (created) *created = false;
|
||||
return(diagram_qtwi);
|
||||
}
|
||||
|
||||
|
||||
if (!created) return(nullptr);
|
||||
|
||||
diagram_qtwi = makeItem(QET::Diagram);
|
||||
if (created) *created = true;
|
||||
*created = true;
|
||||
return(diagram_qtwi);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user