| 101 | } |
| 102 | |
| 103 | void TreeItem::deleteChildren() |
| 104 | { |
| 105 | QVector<TreeItem*> copy = childItems; |
| 106 | clear(); |
| 107 | // Only delete the children after removing them |
| 108 | // from model. Otherwise, the model will touch |
| 109 | // deleted things, with undefined results. |
| 110 | qDeleteAll(copy); |
| 111 | } |
| 112 | |
| 113 | void TreeItem::clear() |
| 114 | { |
no test coverage detected