MCPcopy Create free account
hub / github.com/KDE/kdevelop / addConfiguration

Method addConfiguration

kdevplatform/shell/launchconfigurationdialog.cpp:462–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void 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
478LaunchConfigurationsModel::LaunchConfigurationsModel(QObject* parent): QAbstractItemModel(parent)
479{

Callers

nothing calls this directly

Calls 8

findItemForProjectMethod · 0.80
selectMethod · 0.80
setCurrentIndexMethod · 0.80
projectMethod · 0.45
indexMethod · 0.45
rowCountMethod · 0.45
editMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected