[filelight] [Bug 463442] Crash when hovering over different items after a rescan

Harald Sitter bugzilla_noreply at kde.org
Sun Jan 1 16:00:08 GMT 2023


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

Harald Sitter <sitter at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/util
                   |                            |ities/filelight/commit/a206
                   |                            |fed2488686d4222722ae26e4d25
                   |                            |62abdc1fd

--- Comment #3 from Harald Sitter <sitter at kde.org> ---
Git commit a206fed2488686d4222722ae26e4d2562abdc1fd by Harald Sitter.
Committed on 01/01/2023 at 15:55.
Pushed by sitter into branch 'master'.

change the semantics of duplication

previously this would simply clone the shared pointer, but that leaves
references into the old tree behind which can then cause state confusion
(e.g. the asserts to do with m_parent consistency can fail). instead opt
for a deep-clone behavior. it's more expensive but also much much safer.

code is very exhaustive because we don't want to stack exhaust on
duplication so a recursive call won't do. instead we iterate down the
tree and then append all folders in reverse order.

add a test to ensure duplication works correctly

M  +18   -0    autotests/core/testFileTree.cpp
M  +1    -0    autotests/core/testFileTree.h
M  +44   -0    src/fileTree.cpp
M  +4    -5    src/fileTree.h

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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list