MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / removeItems

Method removeItems

launcher/ui/pages/instance/ExternalResourcesPage.cpp:255–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255void ExternalResourcesPage::removeItems(const QItemSelection& selection)
256{
257 if (m_instance != nullptr && m_instance->isRunning()) {
258 auto response = CustomMessageBox::selectable(this, tr("Confirm Delete"),
259 tr("If you remove this resource while the game is running it may crash your game.\n"
260 "Are you sure you want to do this?"),
261 QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
262 ->exec();
263
264 if (response != QMessageBox::Yes)
265 return;
266 }
267 m_model->deleteResources(selection.indexes());
268}
269
270void ExternalResourcesPage::enableItem()
271{

Callers

nothing calls this directly

Calls 4

selectableFunction · 0.85
deleteResourcesMethod · 0.80
isRunningMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected