Port away from QString::{to,from}Ascii in qmake

Properly use from/toLocal8Bit when referring to user data, even file
names.

Change-Id: I8fc7afa2ea570f8b1b1eecf354f01d6dfe0883cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Thiago Macieira 2012-05-02 14:40:30 +02:00 committed by Qt by Nokia
parent dfd9ef3469
commit 28aa3324de
2 changed files with 3 additions and 3 deletions

View File

@ -213,7 +213,7 @@ GBuildMakefileGenerator::write()
dllbase += DLLOFFSET;
}
warn_msg(WarnParser, Option::output.fileName().toAscii().constData());
warn_msg(WarnParser, Option::output.fileName().toLocal8Bit().constData());
QTextStream t(&Option::output);
QString primaryTarget(project->values("QMAKE_CXX").at(0));
@ -425,7 +425,7 @@ GBuildMakefileGenerator::openOutput(QFile &file, const QString &build) const
outputName += QDir::separator();
outputName += fileInfo(project->projectFile()).baseName();
outputName += projectSuffix();
warn_msg(WarnParser, outputName.toAscii().constData());
warn_msg(WarnParser, outputName.toLocal8Bit().constData());
file.setFileName(outputName);
}
debug_msg(1, "file is %s", file.fileName().toLatin1().constData());

View File

@ -1377,7 +1377,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
}
tmp = project->values("QMAKE_PBX_VARS");
for(int i = 0; i < tmp.count(); i++) {
QString var = tmp[i], val = QString::fromAscii(qgetenv(var.toLatin1().constData()));
QString var = tmp[i], val = QString::fromLocal8Bit(qgetenv(var.toLatin1().constData()));
if(val.isEmpty() && var == "TB")
val = "/usr/bin/";
t << "\t\t\t\t" << writeSettings(var, escapeFilePath(val)) << ";" << "\n";