[Qgis-psc] report of the setting registr QEP implementation

Denis Rouzaud denis.rouzaud at gmail.com
Mon Jan 24 05:27:48 PST 2022


Dear PSC,

Here is the report of the aforementioned QEP:
( also published here:
https://github.com/qgis/QGIS/pull/124#issuecomment-1020097457)

# Final Report

## QEP acceptance

This QEP did not make it during the 2020 votation process.
But thanks to the remaining available funds from QGIS.org and OPENGIS.ch
being OK to offer the rest of the development,
we could start the implementation of a subset of the QEP, the core part
(leaving away the gui part).

## Implementation and changes from the original proposal

Instead of creating the settings at run time, a different approach using
static definitions of the settings was proposed. This reduces the use of
literals in the code and helps the dev experience by bringing code
completion when looking for settings.
The settings are then added to a setting registry. There is a main core
registry to which others can be attached such as gui, app, analysis but
also providers or plugins one.
This nesting of registries allows us to perform introspection.

### What has been achieved

The complete implementation of the core part has been achieved (settings,
registry and Python bindings).
All core settings were migrated.

Code changes:
* core part: https://github.com/qgis/QGIS/pull/42597
* introspection: https://github.com/qgis/QGIS/pull/42860
* migration of core settings: https://github.com/qgis/QGIS/pull/42954

### What is missing from the complete proposal or could be added as a
follow-up

* The rest of the settings must be migrated
* a CI test should be introduced to avoid usage of old API (`QgsSettings`)
* the gui part (providing auto-populated widgets to edit settings: color
picker for color settings, combobox for enum, etc.)
* adapt the advanced settings editor to take advantage of the introspection
and gui part
* a tool to automatically populate an ini file out of current value or
defaults on request
* a migration tool to migrate settings (rename, move, … such as migrating
old R/G/B/A settings to proper color ones.)



Thanks a lot to the organization for sponsoring this dev.
Kind regards,

Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20220124/971de356/attachment.html>


More information about the Qgis-psc mailing list