Fix (tested on gnu/linux): non-ascii file names could not be opened via the command line

Signed-off-by: Mattias Andrée <maandree@operamail.com>
felipesanches-svg
Mattias Andrée 2013-03-04 15:39:52 +01:00
parent 422c668dcb
commit 30ab30f32a
1 changed files with 2 additions and 2 deletions

View File

@ -396,7 +396,7 @@ int main(int argc, char **argv)
#endif
QString qfilename;
if (filename) qfilename = QString::fromStdString(boosty::stringy(boosty::absolute(filename)));
if (filename) qfilename = QString::fromUtf8(boosty::stringy(boosty::absolute(filename)).c_str());
#if 0 /*** disabled by clifford wolf: adds rendering artefacts with OpenCSG ***/
// turn on anti-aliasing
@ -411,7 +411,7 @@ int main(int argc, char **argv)
if (vm.count("input-file")) {
inputFiles = vm["input-file"].as<vector<string> >();
for (vector<string>::const_iterator infile = inputFiles.begin()+1; infile != inputFiles.end(); infile++) {
new MainWindow(QString::fromStdString(boosty::stringy((original_path / *infile))));
new MainWindow(QString::fromUtf8(boosty::stringy((original_path / *infile).c_str()));
}
}
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));