Skip to content

rebuild the iteration tech using better architecture

Harald Sitter requested to merge work/iterator into release/22.04

the previous approach just didn't cut it for windows.

the new code sports a forward iterator that fronts for a platform-dependent walker object that encapsulates the iteration logic

this looks and feels a lot like std::filesystem API but unfortunately we cannot really use that API directly because I want this change to be conservative enough to land in 22.04 as a bugfix for windows, also on POSIX std::filesystem returns the st_size (size in bytes) whereas we want the actual occupied blocks (st_blocks*size), and lastly it's also a tad slower because of heavier abstraction

should we choose to go the std::filesystem route in the future anyway it should be a trivial switch because of how similar the APIs are.

furthermore move to always convert from/to utf8. the QFile helpers ultimately end up in the same code paths anyway, so it seems simpler to just go with the utf8 variants directly (also on windows QFile somehow produces bogus output for actual unicode characters)

the combined set of changes improves windows support substantially. it's now correctly iterating unicode entries, and correctly displaying unicode characters. iteration in general now has unit testing.

BUG: 442299

Merge request reports