| 381 | } |
| 382 | |
| 383 | void ModFolderPage::deleteModMetadata() |
| 384 | { |
| 385 | auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes(); |
| 386 | auto selectionCount = m_model->selectedMods(selection).length(); |
| 387 | if (selectionCount == 0) |
| 388 | return; |
| 389 | if (selectionCount > 1) { |
| 390 | auto response = CustomMessageBox::selectable(this, tr("Confirm Removal"), |
| 391 | tr("You are about to remove the metadata for %1 mods.\n" |
| 392 | "Are you sure?") |
| 393 | .arg(selectionCount), |
| 394 | QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) |
| 395 | ->exec(); |
| 396 | |
| 397 | if (response != QMessageBox::Yes) |
| 398 | return; |
| 399 | } |
| 400 | |
| 401 | m_model->deleteModsMetadata(selection); |
| 402 | } |
| 403 | |
| 404 | void ModFolderPage::changeModVersion() |
| 405 | { |
nothing calls this directly
no test coverage detected