fix non-bootstrapped $$system()'s line end conversions on windows
Change-Id: I026da1312bc28619dc7aa5974b7f4c00710517ac Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
fdc64a445d
commit
d92fd4ca54
@ -343,6 +343,7 @@ void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const
|
|||||||
|
|
||||||
QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
||||||
{
|
{
|
||||||
|
QByteArray out;
|
||||||
#ifndef QT_BOOTSTRAPPED
|
#ifndef QT_BOOTSTRAPPED
|
||||||
QProcess proc;
|
QProcess proc;
|
||||||
runProcess(&proc, args);
|
runProcess(&proc, args);
|
||||||
@ -357,9 +358,12 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
|||||||
m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout));
|
m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout));
|
||||||
}
|
}
|
||||||
# endif
|
# 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
|
#else
|
||||||
QByteArray out;
|
|
||||||
if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ")
|
if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ")
|
||||||
+ IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory()))
|
+ IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory()))
|
||||||
+ QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) {
|
+ QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) {
|
||||||
@ -372,8 +376,8 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
|
|||||||
}
|
}
|
||||||
QT_PCLOSE(proc);
|
QT_PCLOSE(proc);
|
||||||
}
|
}
|
||||||
return out;
|
|
||||||
#endif
|
#endif
|
||||||
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMakeEvaluator::populateDeps(
|
void QMakeEvaluator::populateDeps(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user