aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/proparser
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/proparser')
-rw-r--r--src/shared/proparser/qmakeevaluator.cpp2
-rw-r--r--src/shared/proparser/qmakeglobals.cpp6
-rw-r--r--src/shared/proparser/qmakeglobals.h3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp
index c540e9dff24..59a6b039c36 100644
--- a/src/shared/proparser/qmakeevaluator.cpp
+++ b/src/shared/proparser/qmakeevaluator.cpp
@@ -859,6 +859,8 @@ void QMakeEvaluator::loadDefaults()
vars[ProString("DIR_SEPARATOR")] << ProString(m_option->dir_sep, NoHash);
vars[ProString("DIRLIST_SEPARATOR")] << ProString(m_option->dirlist_sep, NoHash);
vars[ProString("_DATE_")] << ProString(QDateTime::currentDateTime().toString(), NoHash);
+ if (!m_option->qmake_abslocation.isEmpty())
+ vars[ProString("QMAKE_QMAKE")] << ProString(m_option->qmake_abslocation, NoHash);
#if defined(Q_OS_WIN32)
vars[ProString("QMAKE_HOST.os")] << ProString("Windows", NoHash);
diff --git a/src/shared/proparser/qmakeglobals.cpp b/src/shared/proparser/qmakeglobals.cpp
index 06be49e76cd..7d992e0ff22 100644
--- a/src/shared/proparser/qmakeglobals.cpp
+++ b/src/shared/proparser/qmakeglobals.cpp
@@ -184,17 +184,17 @@ QString QMakeGlobals::expandEnvVars(const QString &str) const
}
#ifdef PROEVALUATOR_INIT_PROPS
-bool QMakeGlobals::initProperties(const QString &qmake)
+bool QMakeGlobals::initProperties()
{
QByteArray data;
#ifndef QT_BOOTSTRAPPED
QProcess proc;
- proc.start(qmake, QStringList() << QLatin1String("-query"));
+ proc.start(qmake_abslocation, QStringList() << QLatin1String("-query"));
if (!proc.waitForFinished())
return false;
data = proc.readAll();
#else
- if (FILE *proc = QT_POPEN(QString(IoUtils::shellQuote(qmake) + QLatin1String(" -query"))
+ if (FILE *proc = QT_POPEN(QString(IoUtils::shellQuote(qmake_abslocation) + QLatin1String(" -query"))
.toLocal8Bit(), "r")) {
char buff[1024];
while (!feof(proc))
diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h
index 11b85bebca0..b21c4289f82 100644
--- a/src/shared/proparser/qmakeglobals.h
+++ b/src/shared/proparser/qmakeglobals.h
@@ -84,13 +84,14 @@ public:
QProcessEnvironment environment;
#endif
QString sysroot;
+ QString qmake_abslocation;
QString user_template, user_template_prefix;
// -nocache, -cache, -spec, QMAKESPEC
// -set persistent value
void setCommandLineArguments(const QStringList &args);
#ifdef PROEVALUATOR_INIT_PROPS
- bool initProperties(const QString &qmake);
+ bool initProperties();
#else
void setProperties(const QHash<QString, QString> &props);
#endif