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

Harald Sitter <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/milou/-/commit/cac8ff46a |ma/milou/-/commit/048e2f144
                   |4f67480ea532399ea5dd26aac7d |2fc1a119708f97664021dd5bf28
                   |9d8f                        |4c47

--- Comment #4 from Harald Sitter <[email protected]> ---
Git commit 048e2f1442fc1a119708f97664021dd5bf284c47 by Harald Sitter.
Committed on 07/10/2025 at 10:27.
Pushed by sitter into branch 'Plasma/6.5'.

resultsview: refactor move_category so it doesn't deadlock

- shared impl for both move directions
- have a finite loop condition
- break the loop when finding the first entry of a category

(slightly complicated because the break condition is divergent, I've
opted to handle this inside the move function. another alternative would
have been to pass in an extra conditions function, but that seems just
as complicated and makes for less readable code)

the secret to this function working for both scenarios actually lies in
the caller. the caller suplies a list of indexes and those are either
ascending or descending sorted. effectively allowing us to iterate
always in one direction in the move function.


(cherry picked from commit cac8ff46a4f67480ea532399ea5dd26aac7d9d8f)

Co-authored-by: Harald Sitter <[email protected]>

M  +35   -29   lib/ResultsView.qml

https://invent.kde.org/plasma/milou/-/commit/048e2f1442fc1a119708f97664021dd5bf284c47

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

Reply via email to