[QGIS-Developer] Settings migration from QGIS 2 to 3
Nathan Woodrow
madmanwoo at gmail.com
Mon Oct 30 07:21:18 PDT 2017
> the bottom line is that you cannot rely on capitalization because of
differences in the platforms, even if by using the "ini" file like we are
doing now after Nathan's profile implementation will probably overcome this
issue (reason: The Windows registry and INI files use case-insensitive
keys).
All the platforms should now be case-insensitive I suspect given we are
using ini for everything.
On Mon, Oct 30, 2017 at 11:57 PM, Alessandro Pasotti <apasotti at gmail.com>
wrote:
> On Mon, Oct 30, 2017 at 2:15 PM, Borys Jurgiel <lists at borysjurgiel.pl>
> wrote:
>
>> By the way, do we have a standard for the section naming? Now I don't
>> mean the
>> enumeration, just other top-level sections, like [PluginInstaller].
>> Should I
>> drop the camel case?
>>
>> Sorry for such detailed question, sometimes I'm too pedantic ;)
>>
>
> On the contrary: thank you for raising this point!
>
> This is what I suggest (but no strong opinions so feel free to suggest a
> better/alternative approach):
>
> ideally the main Sections should be kept to minimum, that's why I added
> just a few of them, we can always create all the sub-sections we want
> instead of overcrowding the sections enum.
>
> For anything related to application that is not purely Gui, I would just
> use the "App" section.
>
>
>
>> Regards,
>> Borys
>>
>> Dnia poniedziałek, 30 października 2017 14:08:01 Borys Jurgiel pisze:
>> > Hi,
>> >
>> > I was updating and migrating plugin installer's settings when Alessandro
>> > suggested to create a new QgsSettings::Section::Windows enum value for
>> all
>> > the window geometries, currently placed in the [Windows] section
>> > (capitalized) [1]
>> >
>> > There are over 100 keys there, are we going to migrate them all from
>> Windows
>> > to windows, like we did with Qgis -> qgis?
>>
>
>
> Here, I would follow the Qt recommendations about naming of the setting:
> the bottom line is that you cannot rely on capitalization because of
> differences in the platforms, even if by using the "ini" file like we are
> doing now after Nathan's profile implementation will probably overcome this
> issue (reason: The Windows registry and INI files use case-insensitive
> keys).
>
> So, I'd vote for sticking to an all-lowercase underscore-separated syntax
> but as I said there is not anymore a technical reason for doing so.
>
> see: http://doc.qt.io/qt-5/qsettings.html#section-and-key-syntax
>
>
>
>
>> >
>> > If so, I'll create the new enum value and port a few keys there, but I
>> don't
>> > want to mess if other keys are going to stay in the capitalized
>> [Windows].
>> >
>> > Regards,
>> > Borys
>> >
>> > [1] https://github.com/qgis/QGIS/pull/5494#discussion_r147628437
>> > _______________________________________________
>> > 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
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Alessandro Pasotti
> w3: www.itopen.it
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171031/a18c64e9/attachment.html>
More information about the QGIS-Developer
mailing list