| 537 | } |
| 538 | |
| 539 | int DiskUsage::include(Directory *dir, int depth) |
| 540 | { |
| 541 | int changeNr = 0; |
| 542 | |
| 543 | if (dir == nullptr) |
| 544 | return 0; |
| 545 | |
| 546 | for (Iterator<File> it = dir->iterator(); it != dir->end(); ++it) { |
| 547 | File *item = *it; |
| 548 | |
| 549 | if (item->isDir()) |
| 550 | changeNr += include(dynamic_cast<Directory *>(item), depth + 1); |
| 551 | |
| 552 | if (item->isExcluded()) { |
| 553 | item->exclude(false); |
| 554 | emit changed(item); |
| 555 | changeNr++; |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | if (depth == 0 && changeNr != 0) |
| 560 | emit changeFinished(); |
| 561 | |
| 562 | return changeNr; |
| 563 | } |
| 564 | |
| 565 | void DiskUsage::includeAll() |
| 566 | { |
nothing calls this directly
no test coverage detected