Add validators for names of custom entries, expose permissionExists
Add validators for names of custom entries, expose permissionExists
All those validators will be used in (1) UI dialogs to enable "OK" button, and (2) in the method that actually creates new rows.
Since they gonna be used in QML, they need to be public and exported to the runtime.
Use new validators to prevent users from entering duplicate or invalid entries
Bind "OK" button's enabled state to the result of validation. Also reset content of all fields before the dialog shows up, because it is being reused between different sections.
FlatpakPermissionModel: Enable loading and adding environment variables
Since we have reimplemented all the reading and writing code and added input validation to protect against empty keys (env. var. names), we can finally safely bring them back in the UI.
FlatpakPermissionModel: Update "settings changed" state when saving non-default entries
Entries which are not enabled by default don't have any meaningful default value in upstream metadata, but we reuse the field to represent currently persisted value in user's overrides file. It saves us from slightly larger refactoring in which logical expressions of the SettingHighlighter would need to be rewritten with valueType and (currently unexposed) OverrideValue role in mind.