From 190aa94be7f5e146bef44862b974d733755cec85 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 14 Aug 2017 18:30:29 +0200 Subject: 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 Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a Reviewed-by: Simon Hausmann --- qmake/library/qmakeevaluator.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qmake/library/qmakeevaluator.h') 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); } -- cgit v1.2.3