MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / disableModClicked

Method disableModClicked

tools/launcher/launcherwindow.cpp:567–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567void 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
594static QString getLanguageName(const std::string id)
595{

Callers

nothing calls this directly

Calls 2

rebuildModListMethod · 0.95
addItemMethod · 0.45

Tested by

no test coverage detected