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