[QGIS-Developer] Boolean values vs. strings in QgsSettings and plugin meta data

Nyall Dawson nyall.dawson at gmail.com
Wed Apr 1 16:48:50 PDT 2020


On Wed, 1 Apr 2020 at 21:43, Sebastian M. Ernst <ernst at pleiszenburg.de> wrote:
>
> Hi all,
>
> just seeking some clarification: There are plenty of places in QGIS
> where Boolean values are derived from strings or converted to strings. I
> have been mainly looking at the use in QgsSettings and plugin meta data.
>
> So there are a few formats ... "yes"/"no", "1"/"0", "true"/"false",
> "True"/"False" ...
>
> When I touch a value, I usually stick to whatever form of serialization
> the previous "owner" of this value has chosen (for backwards
> compatibility). Though, is there some consensus on what to use and how
> far backwards compatibility should go? (E.g. should QGIS 3.10 be able to
> flawlessly work with a profile folder that was touched by QGIS 3.12 before?)

It's certainly not a hard requirement. We don't make any claims for
backward compatibility for projects or settings. That said, backward
compatibility *is* nice, so the usual practice is that we only break
backward compatibility when it's really needed (i.e. to enable a new
feature, vs cleanups like you've described).

Hope that clarifies!

Nyall

>
> Best regards,
> Sebastian
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list