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

Akseli Lahtinen <akse...@akselmo.dev> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/plasma-workspace/-/commi |ma/plasma-workspace/-/commi
                   |t/29e38fdfecaeb77d77f0c71aa |t/65c5bc469d53dc70921b10b8c
                   |66d7cc4c3f54b2c             |4527536883a8bb0

--- Comment #22 from Akseli Lahtinen <akse...@akselmo.dev> ---
Git commit 65c5bc469d53dc70921b10b8c4527536883a8bb0 by Akseli Lahtinen.
Committed on 10/07/2024 at 08:47.
Pushed by akselmo into branch 'Plasma/6.1'.

kastatsfavoritesmodel.cpp: prefer .value() over operator[]

- In `removeResult`, use `resource` directly so we are not comparing to a
possible `nullptr` which can cause crashing
- Prefer `.value` over `operator[]` to avoid leaving behind `nullptr` entries
when reading items


(cherry picked from commit 29e38fdfecaeb77d77f0c71aa66d7cc4c3f54b2c)

050c8cc6 kastatsfavoritesmodel.cpp: make sure it.value exists before trying to
reload
faf522c7 Compare value-id directly to resource in removeResult
81ad3a75 Use .value instead of operator[]
737178d2 Remove guards
f0bce1fc Add a comment about the entry value

Co-authored-by: Akseli Lahtinen <akse...@akselmo.dev>

M  +7    -6    applets/kicker/plugin/kastatsfavoritesmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/65c5bc469d53dc70921b10b8c4527536883a8bb0

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

Reply via email to