summaryrefslogtreecommitdiffstats
path: root/qmake/library/qmakeevaluator.h
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/library/qmakeevaluator.h')
-rw-r--r--qmake/library/qmakeevaluator.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h
index 09617ba019..8ca2b182c7 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>
@@ -109,7 +127,7 @@ public:
static void initStatics();
static void initFunctionStatics();
- QMakeEvaluator(QMakeGlobals *option, QMakeParser *parser,
+ QMakeEvaluator(QMakeGlobals *option, QMakeParser *parser, QMakeVfs *vfs,
QMakeHandler *handler);
~QMakeEvaluator();
@@ -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;
@@ -295,6 +313,7 @@ public:
QMakeGlobals *m_option;
QMakeParser *m_parser;
QMakeHandler *m_handler;
+ QMakeVfs *m_vfs;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QMakeEvaluator::LoadFlags)