Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.1.1, 5.2.0, 5.3.1
-
None
Description
I currently experienced degrading performance when testing a settings dialog. We store our settings to .ini files (utf-8) and it turned out the file has grown to about 2MB, although it only contained a few entries. I examined the problem more deeply and it seems something is going wrong when working with multiple QSettings instances at a time (one method creates an instance, calls another method which creates its own instance).
What I think might cause the problem: In the QSettings constructor, ensureAllSectionsParsed() can be called, but at this time, the object is not yet configured with an iniCodec. The documenation states the codec must be set immediately after creating the QSettings object, before accessing any data. We do this right after creating our instances, but it seems this is too late.
I prepared a small program with two test cases:
- first test case causes the utf-8 values to be written as ini escape sequences
- second test case produces unreadable values. Not sure what happens there, maybe a problem with encoding the values twice.
Both test cases cause the ini file to grow with every invocation of the program.
Attachments
Issue Links
- relates to
-
QTBUG-133804 Qt 5 and Qt 6 both use QtProject.conf, but in an incompatible way
-
- Open
-