https://bugs.kde.org/show_bug.cgi?id=442299

Harald Sitter <sit...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://invent.kde.org/util
                   |                            |ities/filelight/commit/e4c9
                   |                            |db692acf2969ef14a927a842fa5
                   |                            |edc657887
         Resolution|---                         |FIXED

--- Comment #5 from Harald Sitter <sit...@kde.org> ---
Git commit e4c9db692acf2969ef14a927a842fa5edc657887 by Harald Sitter.
Committed on 28/04/2022 at 11:33.
Pushed by sitter into branch 'release/22.04'.

rebuild the iteration tech using better architecture

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.

M  +13   -0    autotests/CMakeLists.txt
A  +129  -0    autotests/directoryIteratorTest.cpp     [License: GPL(3+eV)
GPL(v3.0) GPL(v2.0)]
A  +0    -0    autotests/iterator-tree.in/Con 자백/.keep
A  +1    -0    autotests/iterator-tree.in/bar
A  +0    -0    autotests/iterator-tree.in/foo/.keep
A  +7    -0    autotests/test-config.h.cmake
M  +12   -1    src/CMakeLists.txt
A  +14   -0    src/directoryEntry.h     [License: GPL(3+eV) GPL(v3.0)
GPL(v2.0)]
A  +4    -0    src/directoryIterator.cpp     [License: GPL(3+eV) GPL(v3.0)
GPL(v2.0)]
A  +66   -0    src/directoryIterator.h     [License: GPL(3+eV) GPL(v3.0)
GPL(v2.0)]
M  +2    -2    src/fileTree.cpp
M  +1    -2    src/fileTree.h
M  +25   -137  src/localLister.cpp
A  +105  -0    src/posixWalker.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +37   -0    src/posixWalker.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +1    -1    src/radialMap/map.cpp
A  +115  -0    src/windowsWalker.cpp     [License: GPL(3+eV) GPL(v3.0)
GPL(v2.0)]
A  +36   -0    src/windowsWalker.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]

https://invent.kde.org/utilities/filelight/commit/e4c9db692acf2969ef14a927a842fa5edc657887

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to