From 90656ea455abfca233ae7be30e00bb492d438459 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 15 Jun 2015 15:40:22 +0200 Subject: Debugger: Delete pointer if no more needed Introduced with 2b19081cb0840fe9e8d467e7905fbefb680858e1 Change-Id: I817ec48b9098f46ca703a6075d4657f0b7eb9948 Reviewed-by: hjk --- src/plugins/debugger/moduleshandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/debugger/moduleshandler.cpp') diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp index 0e62454b78..5c37a8b1d1 100644 --- a/src/plugins/debugger/moduleshandler.cpp +++ b/src/plugins/debugger/moduleshandler.cpp @@ -212,7 +212,7 @@ Modules ModulesHandler::modules() const void ModulesHandler::removeModule(const QString &modulePath) { if (ModuleItem *item = moduleFromPath(m_model->rootItem(), modulePath)) - m_model->takeItem(item); + delete m_model->takeItem(item); } void ModulesHandler::updateModule(const Module &module) @@ -254,7 +254,7 @@ void ModulesHandler::endUpdateAll() for (int i = root->rowCount(); --i >= 0; ) { auto item = static_cast(root->child(i)); if (!item->updated) - m_model->takeItem(item); + delete m_model->takeItem(item); } } -- cgit v1.2.1