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

Method enableModClicked

tools/launcher/launcherwindow.cpp:540–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540void LauncherWindow::enableModClicked()
541{
542 if (selectedModName == "")
543 return;
544
545 for (const auto &matchingItem :
546 ui->enabledModsList->findItems(QString::fromStdString(selectedModName), Qt::MatchExactly))
547 {
548 auto matchingName = matchingItem->text();
549 // Already enabled
550 if (matchingName.toStdString() == selectedModName)
551 {
552 return;
553 }
554 }
555
556 ui->enabledModsList->addItem(QString::fromStdString(selectedModName));
557
558 for (const auto &matchingItem :
559 ui->disabledModsList->findItems(QString::fromStdString(selectedModName), Qt::MatchExactly))
560 {
561 delete matchingItem;
562 }
563
564 this->rebuildModList();
565}
566
567void LauncherWindow::disableModClicked()
568{

Callers

nothing calls this directly

Calls 2

rebuildModListMethod · 0.95
addItemMethod · 0.45

Tested by

no test coverage detected