title: QSettings: Copy, modify but avoid changing underlying .ini file
body: <p>I read some <code>QSettings</code> from an .ini file:</p>
  
  <pre><code>QSettings* settingsDocRoot=new QSettings(_settingsFile ,QSettings::IniFormat, parent);
  </code></pre>
  
  <p>This is passed to some object. However, I then do a copy <code>QSettings* s2= new QSettings(settingsDocRoot);</code> and modify one particular value <code>s2-&gt;setValue("path", whateverNewPath);</code></p>
  
  <p>Basically I want to pass a slightly modified <code>QSettings</code> object to another object. But how do I <strong>avoid that the original ini file is updated</strong> with the changed value (<code>s2-&gt;setValue</code>)?</p>
  
  <p>One idea was, simply to set the path to "". However, according to <a href="https://stackoverflow.com/questions/4031838/qsettings-where-is-the-location-of-the-ini-file">QSettings - where is the location of the ini file?</a> then a default location will be assumed (OK, original file will not be changed, but unnecessary file will be written).</p>