[openlp-dev] Migrating multiple settings to a single setting

Tim and Alison Bentley Home at trarbentley.net
Wed Nov 8 13:35:11 EST 2017

Use a method to do the change


has some converters.

On 8 November 2017 at 18:21, Raoul Snyman <raoul at snyman.info> wrote:

> Hi guys,
> We've got a settings migration system which will migrate an old setting to
> a new setting. I want to migrate a group of settings to a single new
> setting, but this is not currently supported. Here's what I'm trying to do:
> With the current monitor settings, we store the monitor number the user
> has selected in the settings dialog, the size of the screen, and if the
> size is overridden. I want to migrate this all to a single setting which
> contains a JSON object which allows us to (in the future) support more
> monitors and more detailed settings for each monitor.
> One of the ideas that I had was to read the new value before writing it.
> I'm not sure if this is a good way to do it, but perhaps that could work?
> e.g.
>   ('monitor', 'monitors', [upgrade_monitor, '{}']),
>   ('x position', 'monitors', [upgrade_x_position, '{}']),
>   ('y position', 'monitors', [upgrade_y_position, '{}']),
>   ('width', 'monitors', [upgrade_width, '{}']),
>   ('height', 'monitors', [upgrade_height, '{}']),
> Any other ideas?
> --
> Raoul Snyman
> +1 (520) 490-9743
> raoul at snyman.info
> _______________________________________________
> openlp-dev mailing list
> openlp-dev at openlp.io
> https://lists.openlp.io/mailman/listinfo/openlp-dev

Tim and Alison Bentley
Home at TRARBentley.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openlp.io/pipermail/openlp-dev/attachments/20171108/715daee4/attachment.html>

More information about the openlp-dev mailing list