From f4cc46d5deecb5c9b160248e4d529f6635f95a2e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 4 Aug 2009 16:12:11 +0200 Subject: move qmake property hash to option object that way they are auto-inherited by nested parsers, and it's the right thing to do anyway. --- src/plugins/qt4projectmanager/profilereader.cpp | 2 +- src/shared/proparser/profileevaluator.cpp | 10 ++-------- src/shared/proparser/profileevaluator.h | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/plugins/qt4projectmanager/profilereader.cpp b/src/plugins/qt4projectmanager/profilereader.cpp index 8b408cc260..391a0542e7 100644 --- a/src/plugins/qt4projectmanager/profilereader.cpp +++ b/src/plugins/qt4projectmanager/profilereader.cpp @@ -46,7 +46,7 @@ ProFileReader::~ProFileReader() } void ProFileReader::setQtVersion(QtVersion *qtVersion) { - addProperties(qtVersion->versionInfo()); + m_option.properties = qtVersion->versionInfo(); } bool ProFileReader::readProFile(const QString &fileName) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index e76a01d3f4..75349d0fd5 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -216,7 +216,6 @@ public: QHash m_valuemap; // VariableName must be us-ascii, the content however can be non-us-ascii. QHash > m_filevaluemap; // Variables per include file - QHash m_properties; QString m_outputDir; bool m_definingTest; @@ -1252,8 +1251,8 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() const QString ProFileEvaluator::Private::propertyValue(const QString &name, bool complain) const { - if (m_properties.contains(name)) - return m_properties.value(name); + if (m_option->properties.contains(name)) + return m_option->properties.value(name); if (name == QLatin1String("QMAKE_MKSPECS")) return qmakeMkspecPaths().join(m_option->dirlist_sep); if (name == QLatin1String("QMAKE_VERSION")) @@ -2843,11 +2842,6 @@ QString ProFileEvaluator::propertyValue(const QString &name) const return d->propertyValue(name); } -void ProFileEvaluator::addProperties(const QHash &properties) -{ - updateHash(&(d->m_properties), properties); -} - void ProFileEvaluator::logMessage(const QString &message) { if (d->m_verbose && !d->m_skipLevel) diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h index c252466099..1e0b2f5373 100644 --- a/src/shared/proparser/profileevaluator.h +++ b/src/shared/proparser/profileevaluator.h @@ -70,6 +70,7 @@ public: QString dirlist_sep; QString qmakespec; QString cachefile; + QHash properties; enum TARG_MODE { TARG_UNIX_MODE, TARG_WIN_MODE, TARG_MACX_MODE, TARG_MAC9_MODE, TARG_QNX6_MODE }; TARG_MODE target_mode; @@ -110,7 +111,6 @@ public: bool queryProFile(ProFile *pro, const QString &content); // the same as above but the content is read from "content" string, not from filesystem bool accept(ProFile *pro); - void addProperties(const QHash &properties); QStringList values(const QString &variableName) const; QStringList values(const QString &variableName, const ProFile *pro) const; QStringList absolutePathValues(const QString &variable, const QString &baseDirectory) const; -- cgit v1.2.1