| 717 | } |
| 718 | |
| 719 | Qt::ItemFlags LaunchConfigurationsModel::flags(const QModelIndex& index) const |
| 720 | { |
| 721 | if( index.isValid() && index.column() >= 0 |
| 722 | && index.column() < columnCount( QModelIndex() ) ) |
| 723 | { |
| 724 | auto* t = static_cast<TreeItem*>( index.internalPointer() ); |
| 725 | if( t && ( dynamic_cast<LaunchItem*>( t ) || ( dynamic_cast<LaunchModeItem*>( t ) && index.column() == 1 ) ) ) |
| 726 | { |
| 727 | return Qt::ItemFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable ); |
| 728 | } else if( t ) |
| 729 | { |
| 730 | return Qt::ItemFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable ); |
| 731 | } |
| 732 | } |
| 733 | return Qt::NoItemFlags; |
| 734 | } |
| 735 | |
| 736 | bool LaunchConfigurationsModel::setData(const QModelIndex& index, const QVariant& value, int role) |
| 737 | { |
no test coverage detected