| 653 | } |
| 654 | |
| 655 | QModelIndex LaunchConfigurationsModel::index(int row, int column, const QModelIndex& parent) const |
| 656 | { |
| 657 | if( !hasIndex( row, column, parent ) ) |
| 658 | return QModelIndex(); |
| 659 | TreeItem* tree; |
| 660 | |
| 661 | if( !parent.isValid() ) |
| 662 | { |
| 663 | tree = topItems.at( row ); |
| 664 | } else |
| 665 | { |
| 666 | auto* t = static_cast<TreeItem*>( parent.internalPointer() ); |
| 667 | tree = t->children.at( row ); |
| 668 | } |
| 669 | if( tree ) |
| 670 | { |
| 671 | return createIndex( row, column, tree ); |
| 672 | } |
| 673 | return QModelIndex(); |
| 674 | } |
| 675 | |
| 676 | QModelIndex LaunchConfigurationsModel::parent(const QModelIndex& child) const |
| 677 | { |
no test coverage detected