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

Method shouldExpand

launcher/ui/dialogs/ExportInstanceDialog.cpp:285–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283 }
284
285 bool shouldExpand(QModelIndex index)
286 {
287 QModelIndex sourceIndex = mapToSource(index);
288 QFileSystemModel *fsm = qobject_cast<QFileSystemModel *>(sourceModel());
289 if (!fsm)
290 {
291 return false;
292 }
293 auto blockedPath = relPath(fsm->filePath(sourceIndex));
294 auto found = blocked.find(blockedPath);
295 if(found)
296 {
297 return !found->leaf();
298 }
299 return false;
300 }
301
302 void setBlockedPaths(QStringList paths)
303 {

Callers 1

rowsInsertedMethod · 0.80

Calls 3

filePathMethod · 0.80
leafMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected