diff options
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.h | 6 | ||||
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qtsupport/profilereader.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qtsupport/profilereader.h | 2 | ||||
-rw-r--r-- | src/plugins/qtsupport/qtversionfactory.cpp | 2 | ||||
-rw-r--r-- | src/shared/proparser/profileevaluator.cpp | 7 | ||||
-rw-r--r-- | src/shared/proparser/profileevaluator.h | 10 | ||||
-rw-r--r-- | src/shared/proparser/qmakeglobals.h | 1 | ||||
-rw-r--r-- | tests/manual/proparser/main.cpp | 4 |
10 files changed, 23 insertions, 17 deletions
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 57082238bc..cf343d3781 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -930,7 +930,7 @@ void Qt4Project::proFileParseError(const QString &errorMessage) QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc) { if (!m_qmakeGlobals) { - m_qmakeGlobals = new QMakeGlobals; + m_qmakeGlobals = new ProFileGlobals; m_qmakeGlobalsRefCnt = 0; Profile *p; @@ -978,7 +978,7 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro return reader; } -QMakeGlobals *Qt4Project::qmakeGlobals() +ProFileGlobals *Qt4Project::qmakeGlobals() { return m_qmakeGlobals; } diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h index 58e0287c5d..2c55544ae1 100644 --- a/src/plugins/qt4projectmanager/qt4project.h +++ b/src/plugins/qt4projectmanager/qt4project.h @@ -43,7 +43,7 @@ #include <QFuture> QT_BEGIN_NAMESPACE -class QMakeGlobals; +class ProFileGlobals; QT_END_NAMESPACE namespace ProjectExplorer { class DeploymentData; } @@ -105,7 +105,7 @@ public: /// \internal QtSupport::ProFileReader *createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc = 0); /// \internal - QMakeGlobals *qmakeGlobals(); + ProFileGlobals *qmakeGlobals(); /// \internal void destroyProFileReader(QtSupport::ProFileReader *reader); @@ -194,7 +194,7 @@ private: Internal::Qt4ProjectFiles *m_projectFiles; // cached data during project rescan - QMakeGlobals *m_qmakeGlobals; + ProFileGlobals *m_qmakeGlobals; int m_qmakeGlobalsRefCnt; QTimer m_asyncUpdateTimer; diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index cfcc57e919..37677f2105 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -751,7 +751,7 @@ void BaseQtVersion::ensureMkSpecParsed() const if (mkspecPath().isEmpty()) return; - QMakeGlobals option; + ProFileGlobals option; option.setProperties(versionInfo()); ProMessageHandler msgHandler(true); ProFileCacheManager::instance()->incRefCount(); diff --git a/src/plugins/qtsupport/profilereader.cpp b/src/plugins/qtsupport/profilereader.cpp index 0612e4f4e3..14027fe5d6 100644 --- a/src/plugins/qtsupport/profilereader.cpp +++ b/src/plugins/qtsupport/profilereader.cpp @@ -68,7 +68,7 @@ void ProMessageHandler::fileMessage(const QString &) } -ProFileReader::ProFileReader(QMakeGlobals *option) +ProFileReader::ProFileReader(ProFileGlobals *option) : QMakeParser(ProFileCacheManager::instance()->cache(), this) , ProFileEvaluator(option, this, this) , m_ignoreLevel(0) diff --git a/src/plugins/qtsupport/profilereader.h b/src/plugins/qtsupport/profilereader.h index 39507fe6be..27cc25deba 100644 --- a/src/plugins/qtsupport/profilereader.h +++ b/src/plugins/qtsupport/profilereader.h @@ -71,7 +71,7 @@ class QTSUPPORT_EXPORT ProFileReader : public ProMessageHandler, public QMakePar Q_OBJECT public: - ProFileReader(QMakeGlobals *option); + ProFileReader(ProFileGlobals *option); ~ProFileReader(); QList<ProFile*> includeFiles() const; diff --git a/src/plugins/qtsupport/qtversionfactory.cpp b/src/plugins/qtsupport/qtversionfactory.cpp index 05cd57e87a..783f94256e 100644 --- a/src/plugins/qtsupport/qtversionfactory.cpp +++ b/src/plugins/qtsupport/qtversionfactory.cpp @@ -63,7 +63,7 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileN return 0; Utils::FileName mkspec = BaseQtVersion::mkspecFromVersionInfo(versionInfo); - QMakeGlobals globals; + ProFileGlobals globals; globals.setProperties(versionInfo); ProMessageHandler msgHandler(true); ProFileCacheManager::instance()->incRefCount(); diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index a00e1a2048..32c1da0179 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -44,7 +44,7 @@ void ProFileEvaluator::initialize() QMakeEvaluator::initStatics(); } -ProFileEvaluator::ProFileEvaluator(QMakeGlobals *option, QMakeParser *parser, +ProFileEvaluator::ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, QMakeHandler *handler) : d(new QMakeEvaluator(option, parser, handler)) { @@ -93,16 +93,17 @@ QStringList ProFileEvaluator::values(const QString &variableName, const ProFile QString ProFileEvaluator::sysrootify(const QString &path, const QString &baseDir) const { + ProFileGlobals *option = static_cast<ProFileGlobals *>(d->m_option); #ifdef Q_OS_WIN Qt::CaseSensitivity cs = Qt::CaseInsensitive; #else Qt::CaseSensitivity cs = Qt::CaseSensitive; #endif const bool isHostSystemPath = - d->m_option->sysroot.isEmpty() || path.startsWith(d->m_option->sysroot, cs) + option->sysroot.isEmpty() || path.startsWith(option->sysroot, cs) || path.startsWith(baseDir, cs) || path.startsWith(d->m_outputDir, cs); - return isHostSystemPath ? path : d->m_option->sysroot + path; + return isHostSystemPath ? path : option->sysroot + path; } QStringList ProFileEvaluator::absolutePathValues( diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h index 3d6f917911..f52ca06513 100644 --- a/src/shared/proparser/profileevaluator.h +++ b/src/shared/proparser/profileevaluator.h @@ -32,6 +32,7 @@ #define PROFILEEVALUATOR_H #include "qmake_global.h" +#include "qmakeglobals.h" #include "qmakeevaluator.h" #include "proitems.h" @@ -40,11 +41,16 @@ QT_BEGIN_NAMESPACE -class QMakeGlobals; class QMakeParser; class QMakeEvaluator; class QMakeHandler; +class QMAKE_EXPORT ProFileGlobals : public QMakeGlobals +{ +public: + QString sysroot; +}; + class QMAKE_EXPORT ProFileEvaluator { public: @@ -60,7 +66,7 @@ public: // Call this from a concurrency-free context static void initialize(); - ProFileEvaluator(QMakeGlobals *option, QMakeParser *parser, QMakeHandler *handler); + ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, QMakeHandler *handler); ~ProFileEvaluator(); ProFileEvaluator::TemplateType templateType() const; diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h index 0da5066f1f..85ab0b73d8 100644 --- a/src/shared/proparser/qmakeglobals.h +++ b/src/shared/proparser/qmakeglobals.h @@ -103,7 +103,6 @@ public: #ifndef QT_BOOTSTRAPPED QProcessEnvironment environment; #endif - QString sysroot; QString qmake_abslocation; QString qmakespec, xqmakespec; diff --git a/tests/manual/proparser/main.cpp b/tests/manual/proparser/main.cpp index 1fbb4b2eb5..3137f4769c 100644 --- a/tests/manual/proparser/main.cpp +++ b/tests/manual/proparser/main.cpp @@ -70,7 +70,7 @@ public: static EvalHandler evalHandler; static int evaluate(const QString &fileName, const QString &in_pwd, const QString &out_pwd, - bool cumulative, QMakeGlobals *option, QMakeParser *parser, int level) + bool cumulative, ProFileGlobals *option, QMakeParser *parser, int level) { static QSet<QString> visited; if (visited.contains(fileName)) @@ -143,7 +143,7 @@ int main(int argc, char **argv) { QCoreApplication app(argc, argv); - QMakeGlobals option; + ProFileGlobals option; QString qmake = QString::fromLocal8Bit(qgetenv("TESTREADER_QMAKE")); if (qmake.isEmpty()) qmake = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QLatin1String("/qmake"); |