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

Method remove

launcher/minecraft/PackProfile.cpp:448–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448bool PackProfile::remove(const int index)
449{
450 auto patch = getComponent(index);
451 if (!patch->isRemovable())
452 {
453 qWarning() << "Patch" << patch->getID() << "is non-removable";
454 return false;
455 }
456
457 if(!removeComponent_internal(patch))
458 {
459 qCritical() << "Patch" << patch->getID() << "could not be removed";
460 return false;
461 }
462
463 beginRemoveRows(QModelIndex(), index, index);
464 d->components.removeAt(index);
465 d->componentIndex.remove(patch->getID());
466 endRemoveRows();
467 invalidateLaunchProfile();
468 scheduleSave();
469 return true;
470}
471
472bool PackProfile::remove(const QString id)
473{

Callers 7

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

Calls 3

QModelIndexClass · 0.85
isRemovableMethod · 0.80
getIDMethod · 0.80

Tested by

no test coverage detected