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>
This commit is contained in:
hjk
2015-04-22 14:49:14 +02:00
parent b30b69bbf3
commit 2b19081cb0
15 changed files with 65 additions and 69 deletions

View File

@@ -401,7 +401,7 @@ void BreakHandler::deletionHelper(BreakpointModelId id)
{
Breakpoint b = breakpointById(id);
QTC_ASSERT(b, return);
removeItem(b.b);
takeItem(b.b);
delete b.b;
}
@@ -1132,7 +1132,7 @@ void BreakHandler::saveSessionData()
void BreakHandler::loadSessionData()
{
removeItems();
clear();
loadBreakpoints();
}
@@ -1216,7 +1216,7 @@ void BreakHandler::changeLineNumberFromMarkerHelper(BreakpointModelId id)
Breakpoint b = breakpointById(id);
QTC_ASSERT(b, return);
BreakpointParameters params = b.parameters();
removeItem(b.b);
takeItem(b.b);
delete b.b;
appendBreakpoint(params);
}