Hi.

I am developing a class that handles xml configuration files.
Now i have a function that gets an existing node and edits it, however i can't find the correct solution to get it working.

Here is my code:
Qt Code:
  1. void XfireGamesList::updateConfiguredGame(QString pName, QString pLaunchExe, QString pDetectExe)
  2. {
  3. QDomElement game = getConfiguredGame(pName);
  4. QDomElement command = game.firstChildElement("command");
  5. QDomElement launch = command.firstChildElement("launch");
  6.  
  7. qDebug() << launch.text();
  8. launch.setNodeValue("somevalue");
  9. qDebug() << launch.text();
  10. }
To copy to clipboard, switch view to plain text mode 

getConfiguredGame() returns a QDomElement representing this node for example:
Qt Code:
  1. <game name="The name of a certain game">
  2. <command>
  3. <launch>SOME_PATH</launch>
  4. <detect>SOME_PATH</detect>
  5. </command>
  6. </game>
To copy to clipboard, switch view to plain text mode 

The function isn't able to edit the node values, and the debugging calls outputs "SOME_PATH" twice, so the node should be correct since it returns the correct values, but editing fails.

Does someone know why?
Thanks in advance.