MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / deleteGroup

Method deleteGroup

launcher/ui/MainWindow.cpp:1925–1946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1923}
1924
1925void MainWindow::deleteGroup()
1926{
1927 QObject* obj = sender();
1928 if(!obj)
1929 return;
1930 QAction *action = qobject_cast<QAction *>(obj);
1931 if(!action)
1932 return;
1933 auto map = action->data().toMap();
1934 if(!map.contains("group"))
1935 return;
1936 QString groupName = map["group"].toString();
1937 if(!groupName.isEmpty())
1938 {
1939 auto reply = QMessageBox::question(this, tr("Delete group"), tr("Are you sure you want to delete the group %1?")
1940 .arg(groupName), QMessageBox::Yes | QMessageBox::No);
1941 if(reply == QMessageBox::Yes)
1942 {
1943 APPLICATION->instances()->deleteGroup(groupName);
1944 }
1945 }
1946}
1947
1948void MainWindow::undoTrashInstance()
1949{

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