* ./vlsisapd/src/configuration:
- Bug: In Configuration::writeToStream(), percentage parameters values where incorrectly written (divideds by 100). - Bug: In ConfEditorMain, read the "dot" configuration file *after* the system one.
This commit is contained in:
parent
0b9a17f85d
commit
32c864b996
|
@ -70,13 +70,7 @@ int main ( int argc, char* argv[] )
|
||||||
|
|
||||||
bfs::path::default_name_check ( bfs::portable_posix_name );
|
bfs::path::default_name_check ( bfs::portable_posix_name );
|
||||||
|
|
||||||
Configuration* conf = Configuration::get ();
|
Configuration* conf = Configuration::get ();
|
||||||
bfs::path dotConfPath ( "./.coriolis2.configuration.xml" );
|
|
||||||
|
|
||||||
if ( bfs::exists(dotConfPath) ) {
|
|
||||||
cout << "Reading dot configuration: <" << dotConfPath.string() << ">." << endl;
|
|
||||||
conf->readFromFile ( dotConfPath.string() );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( arguments.count("conf") ) {
|
if ( arguments.count("conf") ) {
|
||||||
bfs::path confPath = ( arguments["conf"].as<string>() );
|
bfs::path confPath = ( arguments["conf"].as<string>() );
|
||||||
|
@ -88,6 +82,12 @@ int main ( int argc, char* argv[] )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bfs::path dotConfPath ( "./.coriolis2.configuration.xml" );
|
||||||
|
if ( bfs::exists(dotConfPath) ) {
|
||||||
|
cout << "Reading dot configuration: <" << dotConfPath.string() << ">." << endl;
|
||||||
|
conf->readFromFile ( dotConfPath.string() );
|
||||||
|
}
|
||||||
|
|
||||||
ConfEditorWidget* editor = new ConfEditorWidget ();
|
ConfEditorWidget* editor = new ConfEditorWidget ();
|
||||||
editor->show ();
|
editor->show ();
|
||||||
|
|
||||||
|
|
|
@ -435,11 +435,16 @@ namespace Cfg {
|
||||||
string id = "\"" + p->getId() + "\"";
|
string id = "\"" + p->getId() + "\"";
|
||||||
string type = "\"" + Parameter::typeToString(p->getType()) + "\"";
|
string type = "\"" + Parameter::typeToString(p->getType()) + "\"";
|
||||||
|
|
||||||
|
|
||||||
out << " <parameter"
|
out << " <parameter"
|
||||||
<< " id=" << setw(40) << left << id
|
<< " id=" << setw(40) << left << id
|
||||||
<< " type=" << setw(12) << left << type
|
<< " type=" << setw(12) << left << type
|
||||||
<< " value=\"" << p->asString() << "\"/>"
|
<< " value=\"";
|
||||||
<< endl;
|
|
||||||
|
if ( p->getType() == Parameter::Percentage ) out << p->asPercentage();
|
||||||
|
else out << p->asString();
|
||||||
|
|
||||||
|
out << "\"/>" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
out << "</configuration>" << endl;
|
out << "</configuration>" << endl;
|
||||||
|
|
Loading…
Reference in New Issue