Commit 27853f82 authored by Mat Sutcliffe's avatar Mat Sutcliffe Committed by Oswald Buddenhagen

qmake: Fix missing newlines in generated vcxproj files

Sync up with qmake - this doesn't actually do anything in qtc.

Change-Id: I792599a4cd7822f109fa921f02207fb1b144b1d1
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/23bce6b169ca14ff72b672965ed5f89424c2d8fe)
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
parent bbb353b1
......@@ -64,9 +64,11 @@
#ifdef Q_OS_WIN32
#define QT_POPEN _popen
#define QT_POPEN_READ "rb"
#define QT_PCLOSE _pclose
#else
#define QT_POPEN popen
#define QT_POPEN_READ "r"
#define QT_PCLOSE pclose
#endif
......@@ -407,7 +409,7 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
#else
if (FILE *proc = QT_POPEN(QString(QLatin1String("cd ")
+ IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory()))
+ QLatin1String(" && ") + args).toLocal8Bit().constData(), "r")) {
+ QLatin1String(" && ") + args).toLocal8Bit().constData(), QT_POPEN_READ)) {
while (!feof(proc)) {
char buff[10 * 1024];
int read_in = int(fread(buff, 1, sizeof(buff), proc));
......@@ -417,6 +419,9 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const
}
QT_PCLOSE(proc);
}
# ifdef Q_OS_WIN
out.replace("\r\n", "\n");
# endif
#endif
return out;
}
......
......@@ -56,9 +56,11 @@
#ifdef Q_OS_WIN32
#define QT_POPEN _popen
#define QT_POPEN_READ "rb"
#define QT_PCLOSE _pclose
#else
#define QT_POPEN popen
#define QT_POPEN_READ "r"
#define QT_PCLOSE pclose
#endif
......@@ -299,7 +301,7 @@ bool QMakeGlobals::initProperties()
data = proc.readAll();
#else
if (FILE *proc = QT_POPEN(QString(QMakeInternal::IoUtils::shellQuote(qmake_abslocation)
+ QLatin1String(" -query")).toLocal8Bit(), "r")) {
+ QLatin1String(" -query")).toLocal8Bit(), QT_POPEN_READ)) {
char buff[1024];
while (!feof(proc))
data.append(buff, int(fread(buff, 1, 1023, proc)));
......
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