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

Method removeVariable

kdevplatform/shell/settings/environmentprofilemodel.cpp:148–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void EnvironmentProfileModel::removeVariable(const QString& variableName)
149{
150 if (m_currentProfileName.isEmpty()) {
151 return;
152 }
153
154 const int pos = m_varsByIndex.indexOf(variableName);
155 if (pos == -1) {
156 return;
157 }
158
159 auto& variables = m_profileListModel->variables(m_currentProfileName);
160
161 beginRemoveRows(QModelIndex(), pos, pos);
162 m_varsByIndex.removeAt(pos);
163 variables.remove(variableName);
164 endRemoveRows();
165}
166
167void EnvironmentProfileModel::setCurrentProfile(const QString& profileName)
168{

Callers

nothing calls this directly

Calls 5

QModelIndexClass · 0.70
isEmptyMethod · 0.45
indexOfMethod · 0.45
variablesMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected