From 055c03c2b72d472be4eb84c578de0b770b78d68d Mon Sep 17 00:00:00 2001 From: Daniele Forsi Date: Sat, 8 Jun 2024 23:01:03 +0200 Subject: [PATCH] Fix memleaks Frees memory allocated in in NoiseFigureGUI::NoiseFigureGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) ...sdrangel/plugins/channelrx/noisefigure/noisefiguregui.cpp:600 in NoiseFigureGUI::NoiseFigureGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) ...sdrangel/plugins/channelrx/noisefigure/noisefiguregui.cpp:660 in NoiseFigureGUI::NoiseFigureGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) ...sdrangel/plugins/channelrx/noisefigure/noisefiguregui.cpp:661 in NoiseFigureGUI::NoiseFigureGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) ...sdrangel/plugins/channelrx/noisefigure/noisefiguregui.cpp:662 in NoiseFigureGUI::NoiseFigureGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) ...sdrangel/plugins/channelrx/noisefigure/noisefiguregui.cpp:663 in NoiseFigureGUI::NoiseFigureGUI(PluginAPI*, DeviceUISet*, BasebandSampleSink*, QWidget*) ...sdrangel/plugins/channelrx/noisefigure/noisefiguregui.cpp:664 --- plugins/channelrx/noisefigure/noisefiguregui.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/channelrx/noisefigure/noisefiguregui.cpp b/plugins/channelrx/noisefigure/noisefiguregui.cpp index 9c0ba3f1d..b371b3061 100644 --- a/plugins/channelrx/noisefigure/noisefiguregui.cpp +++ b/plugins/channelrx/noisefigure/noisefiguregui.cpp @@ -657,11 +657,11 @@ NoiseFigureGUI::NoiseFigureGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B ui->results->setContextMenuPolicy(Qt::CustomContextMenu); connect(ui->results, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customContextMenuRequested(QPoint))); - ui->results->setItemDelegateForColumn(RESULTS_COL_NF, new DecimalDelegate(2)); - ui->results->setItemDelegateForColumn(RESULTS_COL_TEMP, new DecimalDelegate(0)); - ui->results->setItemDelegateForColumn(RESULTS_COL_Y, new DecimalDelegate(2)); - ui->results->setItemDelegateForColumn(RESULTS_COL_ENR, new DecimalDelegate(2)); - ui->results->setItemDelegateForColumn(RESULTS_COL_FLOOR, new DecimalDelegate(1)); + ui->results->setItemDelegateForColumn(RESULTS_COL_NF, new DecimalDelegate(2, ui->results)); + ui->results->setItemDelegateForColumn(RESULTS_COL_TEMP, new DecimalDelegate(0, ui->results)); + ui->results->setItemDelegateForColumn(RESULTS_COL_Y, new DecimalDelegate(2, ui->results)); + ui->results->setItemDelegateForColumn(RESULTS_COL_ENR, new DecimalDelegate(2, ui->results)); + ui->results->setItemDelegateForColumn(RESULTS_COL_FLOOR, new DecimalDelegate(1, ui->results)); ui->startStop->setStyleSheet(QString("QToolButton{ background-color: blue; } QToolButton:checked{ background-color: green; }"));