| 565 | } |
| 566 | |
| 567 | void LauncherWindow::disableModClicked() |
| 568 | { |
| 569 | if (selectedModName == "") |
| 570 | return; |
| 571 | |
| 572 | for (const auto &matchingItem : |
| 573 | ui->disabledModsList->findItems(QString::fromStdString(selectedModName), Qt::MatchExactly)) |
| 574 | { |
| 575 | auto matchingName = matchingItem->text(); |
| 576 | // Already disabled |
| 577 | if (matchingName.toStdString() == selectedModName) |
| 578 | { |
| 579 | return; |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | ui->disabledModsList->addItem(QString::fromStdString(selectedModName)); |
| 584 | |
| 585 | for (const auto &matchingItem : |
| 586 | ui->enabledModsList->findItems(QString::fromStdString(selectedModName), Qt::MatchExactly)) |
| 587 | { |
| 588 | delete matchingItem; |
| 589 | } |
| 590 | |
| 591 | this->rebuildModList(); |
| 592 | } |
| 593 | |
| 594 | static QString getLanguageName(const std::string id) |
| 595 | { |
nothing calls this directly
no test coverage detected