| 301 | } |
| 302 | |
| 303 | void ModFolderPage::deleteModMetadata() |
| 304 | { |
| 305 | auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes(); |
| 306 | auto selectionCount = m_model->selectedMods(selection).length(); |
| 307 | if (selectionCount == 0) |
| 308 | return; |
| 309 | if (selectionCount > 1) { |
| 310 | auto response = CustomMessageBox::selectable(this, tr("Confirm Removal"), |
| 311 | tr("You are about to remove the metadata for %1 mods.\n" |
| 312 | "Are you sure?") |
| 313 | .arg(selectionCount), |
| 314 | QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) |
| 315 | ->exec(); |
| 316 | |
| 317 | if (response != QMessageBox::Yes) |
| 318 | return; |
| 319 | } |
| 320 | |
| 321 | m_model->deleteMetadata(selection); |
| 322 | } |
| 323 | |
| 324 | void ModFolderPage::changeModVersion() |
| 325 | { |
nothing calls this directly
no test coverage detected