| 165 | } |
| 166 | |
| 167 | void 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 | |
| 189 | void EnvironmentProfileModel::setVariablesFromString(const QString& plainText) |
| 190 | { |
no test coverage detected