forked from qt-creator/qt-creator
fix non-bootstrapped $$system()'s line end conversions on windows
Change-Id: I026da1312bc28619dc7aa5974b7f4c00710517ac Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtbase/d92fd4ca54ae71e9c0190d15df9c131435a4be68)
This commit is contained in:
committed by
Oswald Buddenhagen
parent
fd74944d9e
commit
9a33891d49
@@ -332,6 +332,7 @@ void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const
|
||||
|
||||
QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
||||
{
|
||||
QByteArray out;
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
QProcess proc;
|
||||
runProcess(&proc, args);
|
||||
@@ -346,9 +347,12 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
||||
m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout));
|
||||
}
|
||||
# endif
|
||||
return proc.readAllStandardOutput();
|
||||
out = proc.readAllStandardOutput();
|
||||
# ifdef Q_OS_WIN
|
||||
// FIXME: Qt's line end conversion on sequential files should really be fixed
|
||||
out.replace("\r\n", "\n");
|
||||
# endif
|
||||
#else
|
||||
QByteArray out;
|
||||
if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ")
|
||||
+ IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory()))
|
||||
+ QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) {
|
||||
@@ -361,8 +365,8 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
||||
}
|
||||
QT_PCLOSE(proc);
|
||||
}
|
||||
return out;
|
||||
#endif
|
||||
return out;
|
||||
}
|
||||
|
||||
void QMakeEvaluator::populateDeps(
|
||||
|
||||
Reference in New Issue
Block a user