forked from qt-creator/qt-creator
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: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> (cherry picked from qtbase/23bce6b169ca14ff72b672965ed5f89424c2d8fe) Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
committed by
Oswald Buddenhagen
parent
bbb353b113
commit
27853f8234
@@ -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)));
|
||||
|
Reference in New Issue
Block a user