diff options
Diffstat (limited to 'qmake/library/qmakeevaluator.h')
-rw-r--r-- | qmake/library/qmakeevaluator.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h index 09617ba019..91433302d0 100644 --- a/qmake/library/qmakeevaluator.h +++ b/qmake/library/qmakeevaluator.h @@ -55,9 +55,13 @@ #include <qstack.h> #include <qstring.h> #include <qstringlist.h> +#include <qshareddata.h> #ifndef QT_BOOTSTRAPPED # include <qprocess.h> #endif +#ifdef PROEVALUATOR_THREAD_SAFE +# include <qmutex.h> +#endif QT_BEGIN_NAMESPACE @@ -83,6 +87,20 @@ public: virtual void doneWithEval(ProFile *parent) = 0; }; +typedef QPair<QString, QString> QMakeFeatureKey; // key, parent +typedef QHash<QMakeFeatureKey, QString> QMakeFeatureHash; + +class QMAKE_EXPORT QMakeFeatureRoots : public QSharedData +{ +public: + QMakeFeatureRoots(const QStringList &_paths) : paths(_paths) {} + const QStringList paths; + mutable QMakeFeatureHash cache; +#ifdef PROEVALUATOR_THREAD_SAFE + mutable QMutex mutex; +#endif +}; + // We use a QLinkedList based stack instead of a QVector based one (QStack), so that // the addresses of value maps stay constant. The qmake generators rely on that. class QMAKE_EXPORT ProValueMapStack : public QLinkedList<ProValueMap> @@ -284,7 +302,7 @@ public: QStringList m_qmakepath; QStringList m_qmakefeatures; QStringList m_mkspecPaths; - QStringList m_featureRoots; + QExplicitlySharedDataPointer<QMakeFeatureRoots> m_featureRoots; ProString m_dirSep; ProFunctionDefs m_functionDefs; ProStringList m_returnValue; |