Skip to content
Commit c4541059 authored by Marco Martin's avatar Marco Martin
Browse files

Adjust the role api

Part of https://invent.kde.org/frameworks/plasma-framework/-/issues/19.

This is not a fully source compatible change, though makes the filter
and sort roles api much cleaner.
right now it shadows a QAbstractItemModel filerRole property changing
ffrom int to QVariant, trying to guess between a role nameand a role
number.

The rowFilterCallback instead always expects we know the role number as
is sup[posed to use the QModelIndex data() function to fetch the vaue
and do the decision whether filter the row or not. but in many existing
users, the enum of additional roles we want to filter on is not exposed
and even if we used role names, we need to fetch this mapping. this is
the reason in Plasma still many PlasmaCore.SortFilterModel usages are
there and we can't port them to this.
parent 1bda64a3
Pipeline #469713 passed with stage
in 2 minutes and 19 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment