From 4cf431bd60c71f804c43d3d38a7578d75f897ec2 Mon Sep 17 00:00:00 2001 From: baijunjie Date: Fri, 28 Jan 2022 09:33:50 +0800 Subject: [PATCH] Remove the delete in the Destructor function because of the auto delete of the scrollArea(parent) in ukcc. --- search-ukcc-plugin/search.cpp | 9 --------- search-ukcc-plugin/search.h | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/search-ukcc-plugin/search.cpp b/search-ukcc-plugin/search.cpp index 6934579..9d1fe55 100644 --- a/search-ukcc-plugin/search.cpp +++ b/search-ukcc-plugin/search.cpp @@ -19,15 +19,6 @@ Search::Search() initBlockDirsList(); } -Search::~Search() -{ - delete m_pluginWidget; - if (m_gsettings) { - delete m_gsettings; - m_gsettings = nullptr; - } -} - QString Search::plugini18nName() { return m_plugin_name; diff --git a/search-ukcc-plugin/search.h b/search-ukcc-plugin/search.h index 7efdd0a..1124af3 100644 --- a/search-ukcc-plugin/search.h +++ b/search-ukcc-plugin/search.h @@ -43,7 +43,7 @@ class Search : public QObject, CommonInterface public: explicit Search(); - ~Search(); + virtual ~Search() = default; QString plugini18nName() Q_DECL_OVERRIDE; int pluginTypes() Q_DECL_OVERRIDE;