forked from qt-creator/qt-creator
ProjectExplorer: Normale newlines of gcc output
...otherwise the ClangCodeModel might pass on "-DHELLO=1\r" if MingwToolChain is used. Change-Id: I073ba5409822fed75ee30079ef985170acf98f13 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -97,7 +97,8 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons
|
|||||||
return QByteArray();
|
return QByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArray stdErr = cpp.readAllStandardError();
|
const QByteArray stdErr = SynchronousProcess::normalizeNewlines(
|
||||||
|
QString::fromLocal8Bit(cpp.readAllStandardError())).toLocal8Bit();
|
||||||
if (cpp.exitCode() != 0) {
|
if (cpp.exitCode() != 0) {
|
||||||
qWarning().nospace()
|
qWarning().nospace()
|
||||||
<< Q_FUNC_INFO << ": " << gcc.toUserOutput() << ' '
|
<< Q_FUNC_INFO << ": " << gcc.toUserOutput() << ' '
|
||||||
@@ -106,7 +107,8 @@ static QByteArray runGcc(const FileName &gcc, const QStringList &arguments, cons
|
|||||||
return QByteArray();
|
return QByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray data = cpp.readAllStandardOutput();
|
QByteArray data = SynchronousProcess::normalizeNewlines(
|
||||||
|
QString::fromLocal8Bit(cpp.readAllStandardOutput())).toLocal8Bit();
|
||||||
if (!data.isEmpty() && !data.endsWith('\n'))
|
if (!data.isEmpty() && !data.endsWith('\n'))
|
||||||
data.append('\n');
|
data.append('\n');
|
||||||
data.append(stdErr);
|
data.append(stdErr);
|
||||||
|
|||||||
Reference in New Issue
Block a user