I read some QSettings
from an .ini file:
QSettings* settingsDocRoot=new QSettings(_settingsFile ,QSettings::IniFormat, parent);
This is passed to some object. However, I then do a copy QSettings* s2= new QSettings(settingsDocRoot);
and modify one particular value s2->setValue("path", whateverNewPath);
Basically I want to pass a slightly modified QSettings
object to another object. But how do I avoid that the original ini file is updated with the changed value (s2->setValue
)?
One idea was, simply to set the path to "". However, according to QSettings - where is the location of the ini file? then a default location will be assumed (OK, original file will not be changed, but unnecessary file will be written).