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

Method setCurrentProfile

kdevplatform/shell/settings/environmentprofilemodel.cpp:167–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void EnvironmentProfileModel::setCurrentProfile(const QString& profileName)
168{
169 if (profileName == m_currentProfileName) {
170 return;
171 }
172
173 beginResetModel();
174 m_currentProfileName = profileName;
175 m_varsByIndex.clear();
176
177 if (!m_currentProfileName.isEmpty()) {
178 const auto& variables = m_profileListModel->variables(m_currentProfileName);
179
180 m_varsByIndex.reserve(variables.size());
181 const auto endIt = variables.constEnd();
182 for (auto it = variables.constBegin(); it != endIt; ++it) {
183 m_varsByIndex << it.key();
184 }
185 }
186 endResetModel();
187}
188
189void EnvironmentProfileModel::setVariablesFromString(const QString& plainText)
190{

Callers 1

Calls 8

constEndMethod · 0.80
constBeginMethod · 0.80
clearMethod · 0.45
isEmptyMethod · 0.45
variablesMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected