forked from qt-creator/qt-creator
make the value map stack QLinkedList-based
this ensures that the addresses of the maps stay constant, which the qmake generators assume. Change-Id: Ic9f20c75527e0d741a2d4f89d2c587e12724d2ed Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "ioutils.h"
|
||||
|
||||
#include <QList>
|
||||
#include <QLinkedList>
|
||||
#include <QSet>
|
||||
#include <QStack>
|
||||
#include <QString>
|
||||
@@ -71,7 +72,16 @@ public:
|
||||
virtual void doneWithEval(ProFile *parent) = 0;
|
||||
};
|
||||
|
||||
typedef QStack<ProValueMap> ProValueMapStack;
|
||||
// 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>
|
||||
{
|
||||
public:
|
||||
inline void push(const ProValueMap &t) { append(t); }
|
||||
inline ProValueMap pop() { return takeLast(); }
|
||||
ProValueMap &top() { return last(); }
|
||||
const ProValueMap &top() const { return last(); }
|
||||
};
|
||||
|
||||
class QMAKE_EXPORT QMakeEvaluator
|
||||
{
|
||||
|
Reference in New Issue
Block a user