Commit f90a861c authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

ProjectExplorer: Normale newlines of gcc output



...otherwise the ClangCodeModel might pass on "-DHELLO=1\r" if
MingwToolChain is used.

Change-Id: I073ba5409822fed75ee30079ef985170acf98f13
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent e0b31be8
......@@ -97,7 +97,8 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons
return QByteArray();
}
const QByteArray stdErr = cpp.readAllStandardError();
const QByteArray stdErr = SynchronousProcess::normalizeNewlines(
QString::fromLocal8Bit(cpp.readAllStandardError())).toLocal8Bit();
if (cpp.exitCode() != 0) {
qWarning().nospace()
<< Q_FUNC_INFO << ": " << gcc.toUserOutput() << ' '
......@@ -106,7 +107,8 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons
return QByteArray();
}
QByteArray data = cpp.readAllStandardOutput();
QByteArray data = SynchronousProcess::normalizeNewlines(
QString::fromLocal8Bit(cpp.readAllStandardOutput())).toLocal8Bit();
if (!data.isEmpty() && !data.endsWith('\n'))
data.append('\n');
data.append(stdErr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment