MCPcopy Create free account
hub / github.com/MultiMC/Launcher / remove

Method remove

launcher/minecraft/PackProfile.cpp:659–681  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659bool PackProfile::remove(const int index)
660{
661 auto patch = getComponent(index);
662 if (!patch->isRemovable())
663 {
664 qWarning() << "Patch" << patch->getID() << "is non-removable";
665 return false;
666 }
667
668 if(!removeComponent_internal(patch))
669 {
670 qCritical() << "Patch" << patch->getID() << "could not be removed";
671 return false;
672 }
673
674 beginRemoveRows(QModelIndex(), index, index);
675 d->components.removeAt(index);
676 d->componentIndex.remove(patch->getID());
677 endRemoveRows();
678 invalidateLaunchProfile();
679 scheduleSave();
680 return true;
681}
682
683bool PackProfile::remove(const QString id)
684{

Callers 15

resolveDependenciesMethod · 0.45
parseBinaryJsonFileFunction · 0.45
reconstructAssetsFunction · 0.45
plusJarModFromJsonMethod · 0.45
resetIconMethod · 0.45
destroyMethod · 0.45
removeJarMethod · 0.45
MinecraftAccountMethod · 0.45
createFromUsernameMethod · 0.45
invalidateClientTokenMethod · 0.45

Calls 3

QModelIndexClass · 0.85
isRemovableMethod · 0.80
getIDMethod · 0.80

Tested by

no test coverage detected