Since the recent release of Qt 3.3.5, we experienced a problem where xml files were not saved.
Having a peek at the Qt changelog:
- QDom
The default constructor for QDocDocument now creates an empty document that can be used to create elements.
Matthieu Bedouet alerts us that appendChild will not work on empty documents, and it is necessary to import the child.
For example,
podcastB.setAttribute( "product", "amaroK" );
podcastB.setAttribute( "version", APP_VERSION );
podcastB.setAttribute( "formatversion", "1.1" );
doc.appendChild( podcastB );
Should become:
podcastB.setAttribute( "product", "amaroK" );
podcastB.setAttribute( "version", APP_VERSION );
podcastB.setAttribute( "formatversion", "1.1" );
QDomNode podcastNode = doc.importNode( podcastB, TRUE );
doc.appendChild ( podcastNode );