| 146 | } |
| 147 | |
| 148 | void 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 | |
| 167 | void EnvironmentProfileModel::setCurrentProfile(const QString& profileName) |
| 168 | { |
nothing calls this directly
no test coverage detected