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

Method removeProfile

kdevplatform/shell/settings/environmentprofilelistmodel.cpp:118–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118void EnvironmentProfileListModel::removeProfile(int profileIndex)
119{
120 const auto profileNames = this->profileNames();
121 if (profileIndex < 0 || profileIndex >= profileNames.size()) {
122 return;
123 }
124 const auto profileName = profileNames.at(profileIndex);
125 if (defaultProfileName() == profileName) {
126 return;
127 }
128
129 emit profileAboutToBeRemoved(profileName);
130
131 beginRemoveRows(QModelIndex(), profileIndex, profileIndex);
132
133 EnvironmentProfileList::removeProfile(profileName);
134
135 endRemoveRows();
136}
137
138int EnvironmentProfileListModel::cloneProfile(const QString& newProfileName, const QString& sourceProfileName)
139{

Callers 1

removeSelectedProfileMethod · 0.45

Calls 5

defaultProfileNameFunction · 0.85
profileNamesMethod · 0.80
QModelIndexClass · 0.70
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected