| 1215 | } |
| 1216 | |
| 1217 | void BrowserWindow::createTreeTOs(Workspace& workspace) |
| 1218 | { |
| 1219 | //sorting |
| 1220 | if (workspace.rawTOs.size() > 1) { |
| 1221 | std::sort(workspace.rawTOs.begin(), workspace.rawTOs.end(), [&](auto const& left, auto const& right) { |
| 1222 | return _NetworkResourceRawTO::compare(left, right, workspace.sortSpecs) < 0; |
| 1223 | }); |
| 1224 | } |
| 1225 | |
| 1226 | //filtering |
| 1227 | std::vector<NetworkResourceRawTO> filteredRawTOs; |
| 1228 | for (auto const& rawTO : workspace.rawTOs) { |
| 1229 | if (rawTO->matchWithFilter(_filter)) { |
| 1230 | filteredRawTOs.emplace_back(rawTO); |
| 1231 | } |
| 1232 | } |
| 1233 | |
| 1234 | //create treeTOs |
| 1235 | workspace.treeTOs = NetworkResourceService::get().createTreeTOs(filteredRawTOs, workspace.collapsedFolderNames); |
| 1236 | _selectedTreeTO = nullptr; |
| 1237 | } |
| 1238 | |
| 1239 | void BrowserWindow::sortUserList() |
| 1240 | { |
nothing calls this directly
no test coverage detected