| 222 | } |
| 223 | |
| 224 | bool FileIgnoreProxy::shouldExpand(QModelIndex index) |
| 225 | { |
| 226 | QModelIndex sourceIndex = mapToSource(index); |
| 227 | QFileSystemModel* fsm = qobject_cast<QFileSystemModel*>(sourceModel()); |
| 228 | if (!fsm) { |
| 229 | return false; |
| 230 | } |
| 231 | auto blockedPath = relPath(fsm->filePath(sourceIndex)); |
| 232 | auto found = blocked.find(blockedPath); |
| 233 | if (found) { |
| 234 | return !found->leaf(); |
| 235 | } |
| 236 | return false; |
| 237 | } |
| 238 | |
| 239 | void FileIgnoreProxy::setBlockedPaths(QStringList paths) |
| 240 | { |
no test coverage detected