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

Method remove

launcher/minecraft/PackProfile.cpp:422–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420}
421
422bool PackProfile::remove(const int index)
423{
424 auto patch = getComponent(index);
425 if (!patch->isRemovable()) {
426 qCWarning(instanceProfileC) << d->m_instance->name() << "|" << "Patch" << patch->getID() << "is non-removable";
427 return false;
428 }
429
430 if (!removeComponent_internal(patch)) {
431 qCCritical(instanceProfileC) << d->m_instance->name() << "|" << "Patch" << patch->getID() << "could not be removed";
432 return false;
433 }
434
435 beginRemoveRows(QModelIndex(), index, index);
436 d->components.removeAt(index);
437 d->componentIndex.remove(patch->getID());
438 endRemoveRows();
439 invalidateLaunchProfile();
440 scheduleSave();
441 return true;
442}
443
444bool PackProfile::remove(const QString& id)
445{

Callers 7

resolveDependenciesMethod · 0.45
performUpdateActionsMethod · 0.45
reconstructAssetsFunction · 0.45
plusJarModFromJsonMethod · 0.45
resetIconMethod · 0.45
destroyMethod · 0.45

Calls 4

QModelIndexClass · 0.85
isRemovableMethod · 0.80
getIDMethod · 0.80
nameMethod · 0.45

Tested by

no test coverage detected