diff --git a/src/ui/include/predefinedfilterscombobox.h b/src/ui/include/predefinedfilterscombobox.h index 1554cf195..6d97ac2d7 100644 --- a/src/ui/include/predefinedfilterscombobox.h +++ b/src/ui/include/predefinedfilterscombobox.h @@ -51,6 +51,7 @@ class PredefinedFiltersComboBox final : public QComboBox { public: explicit PredefinedFiltersComboBox( QWidget* parent ); + ~PredefinedFiltersComboBox(); PredefinedFiltersComboBox( const PredefinedFiltersComboBox& other ) = delete; PredefinedFiltersComboBox( PredefinedFiltersComboBox&& other ) noexcept = delete; diff --git a/src/ui/src/abstractlogview.cpp b/src/ui/src/abstractlogview.cpp index e4694a776..dfde61b07 100644 --- a/src/ui/src/abstractlogview.cpp +++ b/src/ui/src/abstractlogview.cpp @@ -536,9 +536,11 @@ AbstractLogView::~AbstractLogView() try { if ( quickFind_ ) { quickFind_->stopSearch(); + delete quickFind_; } } catch ( const std::exception& e ) { LOG_ERROR << "Failed to stop search: " << e.what(); + delete quickFind_; } } diff --git a/src/ui/src/predefinedfilterscombobox.cpp b/src/ui/src/predefinedfilterscombobox.cpp index 0f557938f..665ed9a09 100644 --- a/src/ui/src/predefinedfilterscombobox.cpp +++ b/src/ui/src/predefinedfilterscombobox.cpp @@ -102,6 +102,11 @@ PredefinedFiltersComboBox::PredefinedFiltersComboBox( QWidget* parent ) setSizeAdjustPolicy( QComboBox::AdjustToContents ); } +PredefinedFiltersComboBox::~PredefinedFiltersComboBox() +{ + delete model_; +} + void PredefinedFiltersComboBox::populatePredefinedFilters() { model_->clear(); @@ -172,6 +177,7 @@ void PredefinedFiltersComboBox::setTitle( const QString& title ) { auto* titleItem = new QStandardItem( title ); model_->insertRow( 0, titleItem ); + delete titleItem; } void PredefinedFiltersComboBox::insertFilters(