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

Method deleteMods

launcher/minecraft/mod/ModFolderModel.cpp:189–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189bool ModFolderModel::deleteMods(const QModelIndexList& indexes)
190{
191 if(!m_can_interact) {
192 return false;
193 }
194
195 if(indexes.isEmpty())
196 return true;
197
198 for (auto i: indexes)
199 {
200 if(i.column() != 0) {
201 continue;
202 }
203 auto m = at(i.row());
204 auto index_dir = indexDir();
205 m->destroy(index_dir);
206 }
207
208 update();
209
210 return true;
211}
212
213bool ModFolderModel::isValid()
214{

Callers 1

removeItemMethod · 0.80

Calls 2

isEmptyMethod · 0.80
destroyMethod · 0.45

Tested by

no test coverage detected