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

Method uninstallMod

launcher/minecraft/mod/ModFolderModel.cpp:173–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173bool ModFolderModel::uninstallMod(const QString& filename, bool preserve_metadata)
174{
175 for(auto mod : allMods()){
176 if(mod->fileinfo().fileName() == filename){
177 auto index_dir = indexDir();
178 mod->destroy(index_dir, preserve_metadata);
179
180 update();
181
182 return true;
183 }
184 }
185
186 return false;
187}
188
189bool ModFolderModel::deleteMods(const QModelIndexList& indexes)
190{

Callers 1

downloadSucceededMethod · 0.80

Calls 2

fileinfoMethod · 0.80
destroyMethod · 0.45

Tested by

no test coverage detected