| 188 | } |
| 189 | |
| 190 | bool KeyTreeModel::insertRow(KeyTreeItem *item) { |
| 191 | if(item && item->parent()) { |
| 192 | QModelIndex parentQModel = indexFromItem(item->parent()); |
| 193 | beginInsertRows(parentQModel, item->parent()->childCount(), item->parent()->childCount()); |
| 194 | item->parent()->appendChildren(item); |
| 195 | endInsertRows(); |
| 196 | return true; |
| 197 | } |
| 198 | return false; |
| 199 | } |
| 200 | |
| 201 | QModelIndex KeyTreeModel::parent(const QModelIndex &index) const |
| 202 | { |
no test coverage detected