| 460 | } |
| 461 | |
| 462 | void LaunchConfigurationDialog::addConfiguration(ILaunchConfiguration* _launch) |
| 463 | { |
| 464 | auto* launch = dynamic_cast<LaunchConfiguration*>(_launch); |
| 465 | Q_ASSERT(launch); |
| 466 | int row = launch->project() ? model->findItemForProject(launch->project())->row : 0; |
| 467 | QModelIndex idx = model->index(row, 0); |
| 468 | |
| 469 | model->addConfiguration(launch, idx); |
| 470 | |
| 471 | QModelIndex newindex = model->index( model->rowCount( idx ) - 1, 0, idx ); |
| 472 | tree->selectionModel()->select( newindex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows ); |
| 473 | tree->selectionModel()->setCurrentIndex( newindex, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows ); |
| 474 | tree->edit( newindex ); |
| 475 | tree->resizeColumnToContents( 0 ); |
| 476 | } |
| 477 | |
| 478 | LaunchConfigurationsModel::LaunchConfigurationsModel(QObject* parent): QAbstractItemModel(parent) |
| 479 | { |
nothing calls this directly
no test coverage detected