| 276 | } |
| 277 | |
| 278 | void EnvironmentWidget::cloneSelectedProfile() |
| 279 | { |
| 280 | const int currentIndex = ui.profileSelect->currentIndex(); |
| 281 | const auto currentProfileName = m_environmentProfileListModel->profileName(currentIndex); |
| 282 | // pass original name as starting name, as the user might want to enter a variant of it |
| 283 | const auto profileName = askNewProfileName(currentProfileName); |
| 284 | if (profileName.isEmpty()) { |
| 285 | return; |
| 286 | } |
| 287 | |
| 288 | const int profileIndex = m_environmentProfileListModel->cloneProfile(profileName, currentProfileName); |
| 289 | |
| 290 | ui.profileSelect->setCurrentIndex(profileIndex); |
| 291 | ui.variableTable->setFocus(Qt::OtherFocusReason); |
| 292 | } |
| 293 | |
| 294 | void EnvironmentWidget::removeSelectedProfile() |
| 295 | { |
nothing calls this directly
no test coverage detected