| 51 | } |
| 52 | |
| 53 | bool TreeItem::insertChildren(int position, int count, int columns) { |
| 54 | if (position < 0 || position > childItems.size()) |
| 55 | return false; |
| 56 | |
| 57 | for (int row = 0; row < count; ++row) { |
| 58 | QVector<QVariant> childData(columns); |
| 59 | auto* childItem = new TreeItem(childData, this); |
| 60 | childItems.insert(position, childItem); |
| 61 | } |
| 62 | |
| 63 | return true; |
| 64 | } |
| 65 | |
| 66 | bool TreeItem::insertColumns(int position, int columns) { |
| 67 | if (position < 0 || position > itemData.size()) |
no test coverage detected