| 202 | } |
| 203 | |
| 204 | void LocalTreeModel::clear() |
| 205 | { |
| 206 | QWriteLocker locker(&mutex); |
| 207 | items.clear(); |
| 208 | locker.unlock(); |
| 209 | |
| 210 | if (rootItem) { |
| 211 | beginRemoveRows(rootItem->index(), 0, rootItem->childCount() - 1); |
| 212 | rootItem->removeChildren(); |
| 213 | endRemoveRows(); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | QModelIndex LocalTreeModel::indexForItem(const LocalTreeItem *item) const |
| 218 | { |
nothing calls this directly
no test coverage detected