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

Method deleteResources

launcher/minecraft/mod/ResourceFolderModel.cpp:161–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161bool ResourceFolderModel::deleteResources(const QModelIndexList& indexes)
162{
163 if (!m_can_interact)
164 return false;
165
166 if (indexes.isEmpty())
167 return true;
168
169 for (auto i : indexes) {
170 if (i.column() != 0) {
171 continue;
172 }
173
174 auto& resource = m_resources.at(i.row());
175
176 resource->destroy();
177 }
178
179 update();
180
181 return true;
182}
183
184bool ResourceFolderModel::setResourceEnabled(const QModelIndexList &indexes, EnableAction action)
185{

Callers 1

removeItemMethod · 0.80

Calls 3

isEmptyMethod · 0.80
atMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected