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

Method addDep

kdevplatform/project/widgets/dependencieswidget.cpp:107–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void DependenciesWidget::addDep()
108{
109 QIcon icon;
110 KDevelop::ProjectBaseItem* pitem = m_ui->targetDependency->currentItem();
111 if(pitem)
112 icon = QIcon::fromTheme(pitem->iconName());
113
114 auto* item = new QListWidgetItem(icon, m_ui->targetDependency->text(), m_ui->dependencies);
115 item->setData( Qt::UserRole, m_ui->targetDependency->itemPath() );
116 m_ui->targetDependency->clear();
117 m_ui->addDependency->setEnabled( false );
118 m_ui->dependencies->selectionModel()->clearSelection();
119 item->setSelected(true);
120// dependencies->selectionModel()->select( dependencies->model()->index( dependencies->model()->rowCount() - 1, 0, QModelIndex() ), QItemSelectionModel::ClearAndSelect | QItemSelectionModel::SelectCurrent );
121}
122
123void DependenciesWidget::selectItemDialog()
124{

Callers

nothing calls this directly

Calls 7

currentItemMethod · 0.45
iconNameMethod · 0.45
textMethod · 0.45
setDataMethod · 0.45
itemPathMethod · 0.45
clearMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected