Skip to content

FlatpakPermissionModel: Use enum for list section headers, move i18n to QML

ivan tkachenko requested to merge work/ratijas/drop-section-i18n into master

The point of this change is that now we don't have to "unmap" translated header text when adding new permissions from sections buttons; and also this new more granular enum can be reused for Basic/Advanced split, so the old SectionType enum could be dropped along with all its usages.

Unfortunately, the new type could not be used directly for Q_INVOKABLE methods and Q_SLOTS, so we still need to fallback to int. Another caveat is that ListView automatically always converts section data to string.

Also,

Delegate possibleValues generation using valueListForSectionType function

For now, it's just a code deduplication. But the goal is to swap string lists with models that have separate value and display roles.

Merge request reports