Fixed vector of tixmlelements.
This commit is contained in:
@@ -138,7 +138,7 @@ ConfigFile::~ConfigFile()
|
|||||||
|
|
||||||
void ConfigFile::updateConfig(ConfigState myConfigState) {
|
void ConfigFile::updateConfig(ConfigState myConfigState) {
|
||||||
|
|
||||||
int i;
|
size_t i;
|
||||||
|
|
||||||
QtToolsInterface *myQtToolsInterface = new QtToolsWrapper;
|
QtToolsInterface *myQtToolsInterface = new QtToolsWrapper;
|
||||||
|
|
||||||
@@ -207,10 +207,9 @@ void ConfigFile::updateConfig(ConfigState myConfigState) {
|
|||||||
root->LinkEndChild( config );
|
root->LinkEndChild( config );
|
||||||
|
|
||||||
for (i=0; i<configList.size(); i++) {
|
for (i=0; i<configList.size(); i++) {
|
||||||
vector< boost::shared_ptr<TiXmlElement> > TiXmlElements;
|
TiXmlElement *tmpElement = new TiXmlElement(configList[i].name);
|
||||||
TiXmlElements.push_back( boost::shared_ptr<TiXmlElement> (new TiXmlElement(configList[i].name)));
|
config->LinkEndChild( tmpElement );
|
||||||
config->LinkEndChild( TiXmlElements[i] );
|
tmpElement->SetAttribute("value", myQtToolsInterface->stringToUtf8(configList[i].defaultValue));
|
||||||
TiXmlElements[i]->SetAttribute("value", myQtToolsInterface->stringToUtf8(configList[i].defaultValue));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
doc.SaveFile( configFileName );
|
doc.SaveFile( configFileName );
|
||||||
|
|||||||
Reference in New Issue
Block a user