[Development] Is it possible to make QSettingsPrivate::variantToString and its pair a public interface?

Knoll Lars Lars.Knoll at theqtcompany.com
Wed Mar 9 14:46:25 CET 2016


Hi,

While I understand that this would help you, I don’t think this is a good idea. 

QSettings has is’s share of implementation issues, and would at some point benefit from cleaning up or (more likely) rewriting the internals. I wouldn’t want to add to it’s public API right now, as that would make this task even harder than it already is.



Cheers,
Lars

On 09/03/16 14:32, "Development on behalf of NIkolai Marchenko" <development-bounces+lars.knoll=theqtcompany.com at qt-project.org on behalf of enmarantispam at gmail.com> wrote:

>QSettings kinda lacks in consistency when you write data to it as in:
>1) it loses all comments
>2) it randomly reorders values
>While I understand such things were never in scope for this class, for ppl who need above mentioned things, it is either go away from QSettings (which is ugly, cause why are we using a framework then) or manually solving this problem by writing custom
> function to re-insert comments and resave the file with correct values.
>
>
>To do this re-inserting we currently utilize QSettingsPrivate::variantToString pulled from qt sources, but we completely understand the compatibility is not promised for private stuff. While we could ofc write tests to make sure our code doesn't break
> with qt versions and will likely even do so, it would be really nice if we didn't have to copy/paste qt sources and just call functions directly.
>


More information about the Development mailing list