Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.9.1
-
None
-
Ubuntu 14.04
Description
If I set general/serviceMode key to 'true' using QSettings in this way:
static const char * serviceModeKey = "general/serviceMode"; QSettings qSettings(settingsFileName(), QSettings::IniFormat); bool val = qSettings.value(serviceModeKey, false).value<bool>(); bool other_val = true; qSettings.setValue(serviceModeKey, other_val);
'general' section is duplicated, so settings file looks like this:
[%General] serviceMode=true ... [%General] serviceMode=true ...
and the value is false when the app starts next time.
if I rename the key with 'app/serviceMode', for example, it seems to work fine.
The fact that 'general' is prepended with % is not a bug, but normal behaviour, the bug it that it is duplicated and returns false.
Attachments
Issue Links
- duplicates
-
QTBUG-28893 QSettings regression when being used in INI format
-
- Open
-