| 49 | } |
| 50 | |
| 51 | bool doPopulate(std::shared_ptr<const IFileTree> parent, |
| 52 | std::vector<std::shared_ptr<FileTreeEntry>>& entries) const override |
| 53 | { |
| 54 | for (auto* subdirEntry : m_dirEntry->getSubDirectories()) { |
| 55 | entries.push_back(std::make_shared<VirtualFileTreeImpl>(parent, subdirEntry)); |
| 56 | } |
| 57 | for (auto& file : m_dirEntry->getFiles()) { |
| 58 | entries.push_back( |
| 59 | createFileEntry(parent, QString::fromStdWString(file->getName()))); |
| 60 | } |
| 61 | |
| 62 | // Vector is already sorted: |
| 63 | return true; |
| 64 | } |
| 65 | |
| 66 | std::shared_ptr<IFileTree> doClone() const |
| 67 | { |