MCPcopy Create free account
hub / github.com/MultiMC/Launcher / deleteGroup

Method deleteGroup

launcher/ui/MainWindow.cpp:1580–1601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1578}
1579
1580void MainWindow::deleteGroup()
1581{
1582 QObject* obj = sender();
1583 if(!obj)
1584 return;
1585 QAction *action = qobject_cast<QAction *>(obj);
1586 if(!action)
1587 return;
1588 auto map = action->data().toMap();
1589 if(!map.contains("group"))
1590 return;
1591 QString groupName = map["group"].toString();
1592 if(!groupName.isEmpty())
1593 {
1594 auto reply = QMessageBox::question(this, tr("Delete group"), tr("Are you sure you want to delete the group %1")
1595 .arg(groupName), QMessageBox::Yes | QMessageBox::No);
1596 if(reply == QMessageBox::Yes)
1597 {
1598 APPLICATION->instances()->deleteGroup(groupName);
1599 }
1600 }
1601}
1602
1603void MainWindow::on_actionViewInstanceFolder_triggered()
1604{

Callers

nothing calls this directly

Calls 5

isEmptyMethod · 0.80
instancesMethod · 0.80
dataMethod · 0.45
containsMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected