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

Method removeSelectedVariables

kdevplatform/shell/settings/environmentwidget.cpp:207–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void EnvironmentWidget::removeSelectedVariables()
208{
209 const auto selectedRows = ui.variableTable->selectionModel()->selectedRows();
210 if (selectedRows.isEmpty()) {
211 return;
212 }
213
214 QStringList variables;
215 variables.reserve(selectedRows.size());
216 for (const auto& idx : selectedRows) {
217 const QString variable = idx.data(EnvironmentProfileModel::VariableRole).toString();
218 variables << variable;
219 }
220
221 m_environmentProfileModel->removeVariables(variables);
222}
223
224void EnvironmentWidget::onVariableInserted(int column, const QVariant& value)
225{

Callers

nothing calls this directly

Calls 6

removeVariablesMethod · 0.80
isEmptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected