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

ratijas <m...@ratijas.tk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Latest Commit|                            |https://invent.kde.org/fram
                   |                            |eworks/kitemmodels/-/commit
                   |                            |/4a9df06bc89e7c23a16832f730
                   |                            |0e2efc7e9a1ee8
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from ratijas <m...@ratijas.tk> ---
Git commit 4a9df06bc89e7c23a16832f7300e2efc7e9a1ee8 by ivan tkachenko.
Committed on 14/11/2023 at 22:14.
Pushed by ratijas into branch 'master'.

KSortFilterProxyModel: Fix multiple sources of truth confusion

Sort and filter roles may come from upstream model's properties (by ID)
or from our class (by role name), and it is important to keep track
which one was set explicitly and thus should be considered the source
of truth at any given moment in time -- especially if/when source model
is set afterwards such that these pairs of properties can not sync
immediately and have to be delayed instead.

To solve this problem, the an object now stores a flag which determined
the source of truth per each pair, and another flag to prevent
recursion and switch to "Role ID" source when *RoleChanged signals are
emitted NOT as a side-effect of us updating a corresponding *RoleName.

M  +93   -3    autotests/ksortfilterproxymodel_qml.cpp
M  +96   -39   src/qml/ksortfilterproxymodel.cpp
M  +24   -3    src/qml/ksortfilterproxymodel.h

https://invent.kde.org/frameworks/kitemmodels/-/commit/4a9df06bc89e7c23a16832f7300e2efc7e9a1ee8

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

Reply via email to