diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-06-15 15:40:22 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2015-06-16 11:31:45 +0000 |
commit | 90656ea455abfca233ae7be30e00bb492d438459 (patch) | |
tree | 601636576eba4a58328dadb02be5713dea8078d3 /src/plugins/debugger/moduleshandler.cpp | |
parent | d92055dde4b16de9456bb2d09c61bda937e06de8 (diff) | |
download | qt-creator-90656ea455abfca233ae7be30e00bb492d438459.tar.gz |
Debugger: Delete pointer if no more needed
Introduced with 2b19081cb0840fe9e8d467e7905fbefb680858e1
Change-Id: I817ec48b9098f46ca703a6075d4657f0b7eb9948
Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/moduleshandler.cpp')
-rw-r--r-- | src/plugins/debugger/moduleshandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<ModuleItem *>(root->child(i)); if (!item->updated) - m_model->takeItem(item); + delete m_model->takeItem(item); } } |