| 791 | } |
| 792 | |
| 793 | LaunchConfiguration* LaunchConfigurationsModel::configForIndex(const QModelIndex& idx ) const |
| 794 | { |
| 795 | if( idx.isValid() ) |
| 796 | { |
| 797 | auto* item = dynamic_cast<LaunchItem*>( static_cast<TreeItem*>( idx.internalPointer() ) ); |
| 798 | if( item ) |
| 799 | { |
| 800 | return item->launch; |
| 801 | } |
| 802 | auto* lmitem = dynamic_cast<LaunchModeItem*>( static_cast<TreeItem*>( idx.internalPointer() ) ); |
| 803 | if( lmitem ) |
| 804 | { |
| 805 | return dynamic_cast<LaunchItem*>( lmitem->parent )->launch; |
| 806 | } |
| 807 | } |
| 808 | return nullptr; |
| 809 | } |
| 810 | |
| 811 | QModelIndex LaunchConfigurationsModel::indexForConfig( LaunchConfiguration* l ) const |
| 812 | { |
no test coverage detected