I am using QSettings to try and figure out if an INI is valid.(using status() to check) I made a purposefully invalid INI file and loaded it in. The first time the code is called, it returns invalid, but every time after that, it returns valid. Is this a bug in my code?
It's a Qt bug caused by some global state. Note that the difference in results happens whether or not you call delete on your QSettings object, which you should. Here's a brief summary of what happens on the first run:
NoError.qsettings.cpp line 1530 (Qt-4.6.2)qsettings.cpp line 1552).And the second run is different:
NoError.qsettings.cpp line 1424).NoError -- the file was assumed to have been parsed correctly.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With