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

Method deleteWorld

launcher/minecraft/WorldList.cpp:131–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool WorldList::deleteWorld(int index)
132{
133 if (index >= worlds.size() || index < 0)
134 return false;
135 World &m = worlds[index];
136 if (m.destroy())
137 {
138 beginRemoveRows(QModelIndex(), index, index);
139 worlds.removeAt(index);
140 endRemoveRows();
141 emit changed();
142 return true;
143 }
144 return false;
145}
146
147bool WorldList::deleteWorlds(int first, int last)
148{

Callers 1

Calls 3

QModelIndexClass · 0.85
sizeMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected