| 233 | |
| 234 | |
| 235 | QModelIndex ThreadFrameModel::index(int row, int column, const QModelIndex& parent) const |
| 236 | { |
| 237 | if (!hasIndex(row, column, parent)) |
| 238 | return QModelIndex(); |
| 239 | |
| 240 | FrameItem* parentItem; |
| 241 | |
| 242 | if (!parent.isValid()) |
| 243 | parentItem = rootItem; |
| 244 | else |
| 245 | parentItem = static_cast<FrameItem*>(parent.internalPointer()); |
| 246 | |
| 247 | FrameItem* childItem = parentItem->child(row); |
| 248 | if (childItem) |
| 249 | return createIndex(row, column, childItem); |
| 250 | return QModelIndex(); |
| 251 | } |
| 252 | |
| 253 | |
| 254 | QModelIndex ThreadFrameModel::parent(const QModelIndex& index) const |
no test coverage detected