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

Method on_actionCopyInstance_triggered

launcher/ui/MainWindow.cpp:1712–1727  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1710}
1711
1712void MainWindow::on_actionCopyInstance_triggered()
1713{
1714 if (!m_selectedInstance)
1715 return;
1716
1717 CopyInstanceDialog copyInstDlg(m_selectedInstance, this);
1718 if (!copyInstDlg.exec())
1719 return;
1720
1721 auto copyTask = new InstanceCopyTask(m_selectedInstance, copyInstDlg.shouldCopySaves(), copyInstDlg.shouldKeepPlaytime());
1722 copyTask->setName(copyInstDlg.instName());
1723 copyTask->setGroup(copyInstDlg.instGroup());
1724 copyTask->setIcon(copyInstDlg.iconKey());
1725 unique_qobject_ptr<Task> task(APPLICATION->instances()->wrapInstanceTask(copyTask));
1726 runModalTask(task.get());
1727}
1728
1729void MainWindow::finalizeInstance(InstancePtr inst)
1730{

Callers

nothing calls this directly

Calls 12

shouldCopySavesMethod · 0.80
shouldKeepPlaytimeMethod · 0.80
setGroupMethod · 0.80
wrapInstanceTaskMethod · 0.80
instancesMethod · 0.80
execMethod · 0.45
setNameMethod · 0.45
instNameMethod · 0.45
instGroupMethod · 0.45
setIconMethod · 0.45
iconKeyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected