TreeModel: Introduce a destroyItem() convenience function

Shorthand for delete takeItem(...).

Change-Id: Icb7b60e5c19aa0d21650eefff65f7eb55e9f90b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-07-04 15:53:53 +02:00
committed by hjk
parent 4c5ee0c02b
commit 7b4c7d49a9
15 changed files with 30 additions and 29 deletions

View File

@@ -348,7 +348,7 @@ void BreakHandler::deletionHelper(BreakpointModelId id)
{
Breakpoint b = breakpointById(id);
QTC_ASSERT(b, return);
delete takeItem(b.b);
destroyItem(b.b);
}
Breakpoint BreakHandler::findWatchpoint(const BreakpointParameters &params) const
@@ -1169,7 +1169,7 @@ void BreakHandler::changeLineNumberFromMarkerHelper(BreakpointModelId id)
Breakpoint b = breakpointById(id);
QTC_ASSERT(b, return);
BreakpointParameters params = b.parameters();
delete takeItem(b.b);
destroyItem(b.b);
appendBreakpoint(params);
}