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

Method shouldExpand

launcher/ui/dialogs/ExportInstanceDialog.cpp:265–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263 }
264
265 bool shouldExpand(QModelIndex index)
266 {
267 QModelIndex sourceIndex = mapToSource(index);
268 QFileSystemModel *fsm = qobject_cast<QFileSystemModel *>(sourceModel());
269 if (!fsm)
270 {
271 return false;
272 }
273 auto blockedPath = relPath(fsm->filePath(sourceIndex));
274 auto found = blocked.find(blockedPath);
275 if(found)
276 {
277 return !found->leaf();
278 }
279 return false;
280 }
281
282 void setBlockedPaths(QStringList paths)
283 {

Callers 1

rowsInsertedMethod · 0.80

Calls 3

filePathMethod · 0.80
leafMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected