| 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 | { |
no test coverage detected