summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/moduleshandler.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-04-22 14:49:14 +0200
committerhjk <hjk@theqtcompany.com>2015-04-22 13:48:18 +0000
commit2b19081cb0840fe9e8d467e7905fbefb680858e1 (patch)
tree7f52ded2cc82c3505486651ca54a3200ce886c9f /src/plugins/debugger/moduleshandler.cpp
parentb30b69bbf3beed91350f6ccfb0272f7b160f0d17 (diff)
downloadqt-creator-2b19081cb0840fe9e8d467e7905fbefb680858e1.tar.gz
TreeModel: More API cleanup
- introduce topLevelItemCount (similar to QTreeWidget) - squash untypedTreeLevelItems() - rename removeItems() to clear() - rename removeItem() to takeItem() - rename treeLevelItems<> to itemsAtLevel<> Change-Id: I0f1bb4110f7687b20da3d92e3d943858645a9fa2 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/moduleshandler.cpp')
-rw-r--r--src/plugins/debugger/moduleshandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/debugger/moduleshandler.cpp b/src/plugins/debugger/moduleshandler.cpp
index 3e793a424b..0e62454b78 100644
--- a/src/plugins/debugger/moduleshandler.cpp
+++ b/src/plugins/debugger/moduleshandler.cpp
@@ -197,7 +197,7 @@ QAbstractItemModel *ModulesHandler::model() const
void ModulesHandler::removeAll()
{
- m_model->removeItems();
+ m_model->clear();
}
Modules ModulesHandler::modules() const
@@ -212,7 +212,7 @@ Modules ModulesHandler::modules() const
void ModulesHandler::removeModule(const QString &modulePath)
{
if (ModuleItem *item = moduleFromPath(m_model->rootItem(), modulePath))
- m_model->removeItem(item);
+ 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->removeItem(item);
+ m_model->takeItem(item);
}
}