diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-08-14 18:30:29 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-08-15 10:54:50 +0000 |
commit | 190aa94be7f5e146bef44862b974d733755cec85 (patch) | |
tree | f347424990930691ebc2b9cd39794ae74984f8f5 /qmake/library/qmakeevaluator.h | |
parent | e6fad35155a25a932386ad6f8421efd74404ac7f (diff) |
Change source identifier type in ProString
The strings remember in which file they were created/assigned.
However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().
Since we actually need only a unique id for comparison, let's use an
integer for that.
Task-number: QTBUG-62434
Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'qmake/library/qmakeevaluator.h')
-rw-r--r-- | qmake/library/qmakeevaluator.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qmake/library/qmakeevaluator.h b/qmake/library/qmakeevaluator.h index 5948bd7d14..fcac0388c7 100644 --- a/qmake/library/qmakeevaluator.h +++ b/qmake/library/qmakeevaluator.h @@ -176,12 +176,13 @@ public: void setTemplate(); - ProStringList split_value_list(const QStringRef &vals, const ProFile *source = 0); + ProStringList split_value_list(const QStringRef &vals, int source = 0); VisitReturn expandVariableReferences(const ushort *&tokPtr, int sizeHint, ProStringList *ret, bool joined); QString currentFileName() const; QString currentDirectory() const; ProFile *currentProFile() const; + int currentFileId() const; QString resolvePath(const QString &fileName) const { return QMakeInternal::IoUtils::resolvePath(currentDirectory(), fileName); } |