diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-06-27 10:58:38 +0000 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-12-21 13:08:15 +0000 |
commit | b40942bbb86b4aca702b64106c849aceb99031bd (patch) | |
tree | 1bc5e26c07b5ab3e62980c9b8714465f41d32b53 | |
parent | eb3a8c3dd917728ca68981741e21862fe3e639b6 (diff) |
Revert "qdoc: Query environment variables from qmake"
this change is misguided:
- for the qt doc build, the correct way is to adjust qt_docs.prf to feed
the right data
- projects which are actually outside qt have no business in using these
variables (and the data they refer to)
This reverts commit 61062f6769670b1a33c3f4406d51892c221a26fd.
Change-Id: I54dbfc04802bf50aa250810ce2e8475fef751669
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | src/qdoc/config.cpp | 31 | ||||
-rw-r--r-- | src/qdoc/config.h | 1 |
2 files changed, 2 insertions, 30 deletions
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp index 27018007b..64c8786f6 100644 --- a/src/qdoc/config.cpp +++ b/src/qdoc/config.cpp @@ -39,9 +39,6 @@ #include "config.h" #include "generator.h" #include <stdlib.h> -#if QT_CONFIG(process) -#include "qprocess.h" -#endif QT_BEGIN_NAMESPACE @@ -932,30 +929,6 @@ QStringList Config::loadMaster(const QString& fileName) } /*! - Returns the value of the environment variable \a varName. - If qgetenv() returns null and \a varName starts with 'Q', - try to query the variable from qmake. -*/ -QByteArray Config::getEnv(const char *varName) -{ - QByteArray var = qgetenv(varName); -#if QT_CONFIG(process) - if (var.isNull() && varName[0] == 'Q') { - QString path(QCoreApplication::applicationFilePath()); - path.replace(path.lastIndexOf('/') + 1, prog.size(), "qmake"); - QProcess qmake; - qmake.start(path, QStringList() << "-query" << varName); - if (qmake.waitForFinished()) { - QByteArray result = qmake.readAll().trimmed(); - if (result.at(0) != '*') - var = result; - } - } -#endif - return var; -} - -/*! Load, parse, and process a qdoc configuration file. This function is only called by the other load() function, but this one is recursive, i.e., it calls itself when it sees @@ -1059,7 +1032,7 @@ void Config::load(Location location, const QString& fileName) SKIP_CHAR(); } if (!var.isEmpty()) { - const QByteArray val = getEnv(var.toLatin1().data()); + const QByteArray val = qgetenv(var.toLatin1().data()); if (val.isNull()) { location.fatal(tr("Environment variable '%1' undefined").arg(var)); } @@ -1167,7 +1140,7 @@ void Config::load(Location location, const QString& fileName) SKIP_CHAR(); } if (!var.isEmpty()) { - const QByteArray val = getEnv(var.toLatin1().constData()); + const QByteArray val = qgetenv(var.toLatin1().constData()); if (val.isNull()) { location.fatal(tr("Environment variable '%1' undefined").arg(var)); } diff --git a/src/qdoc/config.h b/src/qdoc/config.h index ce705370b..0de7076eb 100644 --- a/src/qdoc/config.h +++ b/src/qdoc/config.h @@ -102,7 +102,6 @@ public: QString getIncludeFilePath(const QString& fileName) const; QStringList getExampleQdocFiles(const QSet<QString> &excludedDirs, const QSet<QString> &excludedFiles); QStringList getExampleImageFiles(const QSet<QString> &excludedDirs, const QSet<QString> &excludedFiles); - QByteArray getEnv(const char *varName); static QStringList loadMaster(const QString& fileName); static bool isFileExcluded(const QString &fileName, const QSet<QString> &excludedFiles); |