Fix build with no-cast-from-ascii

Change-Id: I720ceb4e511c914b924c473470f65b5b248f682a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Simon Hausmann 2018-10-11 10:43:18 +02:00
parent 38ead1f24f
commit c9aeb73fd1
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ qint32 main(qint32 argc, char **argv)
return -1;
}
QFile fid(argv[1]);
QFile fid(QFile::decodeName(argv[1]));
if (!fid.open(QIODevice::WriteOnly | QIODevice::Text)) {
qWarning() << "Abort: Failed to open/create file" << fid.fileName();
return -1;

View File

@ -46,7 +46,7 @@ QString includeGuard(const QString &filename)
for (int i = 0; i < guard.size(); ++i) {
if (!guard.at(i).isLetterOrNumber())
guard[i] = QChar('_');
guard[i] = QLatin1Char('_');
}
return guard;