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

Method moveDependencyUp

kdevplatform/project/widgets/dependencieswidget.cpp:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void DependenciesWidget::moveDependencyUp()
93{
94
95 QList<QListWidgetItem*> list = m_ui->dependencies->selectedItems();
96 if( !list.isEmpty() )
97 {
98 Q_ASSERT( list.count() == 1 );
99 QListWidgetItem* item = list.at( 0 );
100 int row = m_ui->dependencies->row( item );
101 m_ui->dependencies->takeItem( row );
102 m_ui->dependencies->insertItem( row-1, item );
103 m_ui->dependencies->selectionModel()->select( m_ui->dependencies->model()->index( row-1, 0, QModelIndex() ), QItemSelectionModel::ClearAndSelect | QItemSelectionModel::SelectCurrent );
104 }
105}
106
107void DependenciesWidget::addDep()
108{

Callers

nothing calls this directly

Calls 9

selectedItemsMethod · 0.80
selectMethod · 0.80
QModelIndexClass · 0.50
isEmptyMethod · 0.45
countMethod · 0.45
atMethod · 0.45
rowMethod · 0.45
indexMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected