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

Method deleteGroup

launcher/ui/MainWindow.cpp:1562–1583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1560}
1561
1562void MainWindow::deleteGroup()
1563{
1564 QObject* obj = sender();
1565 if(!obj)
1566 return;
1567 QAction *action = qobject_cast<QAction *>(obj);
1568 if(!action)
1569 return;
1570 auto map = action->data().toMap();
1571 if(!map.contains("group"))
1572 return;
1573 QString groupName = map["group"].toString();
1574 if(!groupName.isEmpty())
1575 {
1576 auto reply = QMessageBox::question(this, tr("Delete group"), tr("Are you sure you want to delete the group %1")
1577 .arg(groupName), QMessageBox::Yes | QMessageBox::No);
1578 if(reply == QMessageBox::Yes)
1579 {
1580 APPLICATION->instances()->deleteGroup(groupName);
1581 }
1582 }
1583}
1584
1585void MainWindow::on_actionViewInstanceFolder_triggered()
1586{

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