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

cwo <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/plasma-activities-stats/
                   |                            |-/commit/b9b976a60c574d07a1
                   |                            |65090774564b00620580c6
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from cwo <[email protected]> ---
Git commit b9b976a60c574d07a165090774564b00620580c6 by Christoph Wolk.
Committed on 01/12/2025 at 00:49.
Pushed by cwo into branch 'master'.

resultwatcher: send resultRemoved signal on type-restricted queries

When the forget methods on a ResultModel are called, the model instructs
the database to forget that particular resource, the ResultWatcher
notices this change in the database and sends a signal back to the model
that the resource is now gone, and the model can now remove that row and
send the correspnding signals to its consumers. But this process fails
if the query uses a type restriction - the watcher checks whether the
deleted resource also matches the type filter, and for that it needs to
ask the database what the mimetype of the resource is. But the database
doesn't know anymore, because we just instructed it to forget it. So
the forgetting happens, but the model doesn't learn about this, and will
continue to show the forgotten entry until it is refreshed for some
other reason.

Instead, we skip the check for matching type. If the type of the file
didn't match, it won't be in the cache and the model will skip further
action.

M  +4    -6    src/resultwatcher.cpp

https://invent.kde.org/plasma/plasma-activities-stats/-/commit/b9b976a60c574d07a165090774564b00620580c6

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

Reply via email to