QSettings::beginWriteArray() produces incorrect output under Linux (bug?)
-
@Pl45m4
From your https://forum.qt.io/topic/79494/qsetting-array/4 it looks like it is producing\
s elsewhere. At least I know. Then it's perhaps just a docs issue.@JonB said in QSettings::beginWriteArray() produces incorrect output under Linux (bug?):
@Pl45m4
From your https://forum.qt.io/topic/79494/qsetting-array/4 it looks like it is producing\
s elsewhere.Just because others face the same issue or behavior, it doesn't mean that it's intended or correct :)
Could be wrong (buggy) since years / many releases, but seems to work :)@JonB said in QSettings::beginWriteArray() produces incorrect output under Linux (bug?):
Then it's perhaps just a docs issue.
The second part of my post (the Qt source code) shows that it's not a doc issue. You can also find the same comment in the source code ("The generated keys will have the form.... bla...")... Really weird...
-
What's the problem as long as beginReadArray() can read them later on?
-
What's the problem as long as beginReadArray() can read them later on?
@Christian-Ehrlicher
At the time I raised the question I did not yet know whether it could be read OK. Now I am pleased to report it does. I merely asked to see if it was the same for others. I do not know if there any other consequences, hopefully not.So you belong to the "it doesn't matter what the docs say as long as it works" school ;-)
-
@Christian-Ehrlicher
At the time I raised the question I did not yet know whether it could be read OK. Now I am pleased to report it does. I merely asked to see if it was the same for others. I do not know if there any other consequences, hopefully not.So you belong to the "it doesn't matter what the docs say as long as it works" school ;-)
Nevertheless, it would be satisfying (for me as well) if someone could explain where the backslashes come from, because even in current sources arrays start explicitly with '/'. (https://github.com/radekp/qt/blob/master/src/corelib/io/qsettings.cpp#L393)
-
Nevertheless, it would be satisfying (for me as well) if someone could explain where the backslashes come from, because even in current sources arrays start explicitly with '/'. (https://github.com/radekp/qt/blob/master/src/corelib/io/qsettings.cpp#L393)
Nevertheless, it would be satisfying (for me as well) if someone could explain where the backslashes come from
All backslashes live in a land of their own, where everything is the wrong way round. They emanate from there, mystically. And sometimes arrive in pairs.
I will raise a report on the Qt bug forum tomorrow and they can decide whether it's a documentation or behaviour issue.
-
@Christian-Ehrlicher
At the time I raised the question I did not yet know whether it could be read OK. Now I am pleased to report it does. I merely asked to see if it was the same for others. I do not know if there any other consequences, hopefully not.So you belong to the "it doesn't matter what the docs say as long as it works" school ;-)
@JonB said in QSettings::beginWriteArray() produces incorrect output under Linux (bug?):
So you belong to the "it doesn't matter what the docs say as long as it works" school ;-)
No, but to the 'I don't care about the internals as long as the library can read it again'. Or do you really care how e.g. QDataStream encodes and decodes the stuff as long as it is doing what you expect?
-
@JonB said in QSettings::beginWriteArray() produces incorrect output under Linux (bug?):
So you belong to the "it doesn't matter what the docs say as long as it works" school ;-)
No, but to the 'I don't care about the internals as long as the library can read it again'. Or do you really care how e.g. QDataStream encodes and decodes the stuff as long as it is doing what you expect?
@Christian-Ehrlicher
So are you saying you'd rather I didn't report it? When the docs choose to tell me the file will look like such & such and I try it and it does not, I shouldn't question it, shouldn't ask about it here but just assume it's fine? I don't understand your point/suggestion? -
From my pov that's only a documentation error.
-
From my pov that's only a documentation error.
@Christian-Ehrlicher
No problem. I'll log it tomorrow, if it's only docs and the behaviour is intended then at least someone (might be you!) will have seen it and can decide. -
For right or for wrong, raised https://bugreports.qt.io/browse/QTBUG-81951. Hopefully someone will check whether it's only a documentation issue or if it has any consequences.