From 4a59a7d714bdfdf54e279d6dc8de11383fff7ccd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 25 Oct 2016 21:24:34 +0200 Subject: remove duplicate resolution of sources from cumulative pass instead of resolving all sources both in the exact and the cumulative pass and de-duplicating the joined list in the end, resolve only these files from the cumulative pass which are unique to it to start with. Change-Id: Ie3327799ecd94f8710f8b99bcc46998790ba2c74 Reviewed-by: Tobias Hunger --- src/shared/proparser/profileevaluator.cpp | 7 ++++++- src/shared/proparser/profileevaluator.h | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/shared/proparser') diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 2c179a2584..3124b27331 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -120,11 +120,16 @@ QStringList ProFileEvaluator::absolutePathValues( } QVector ProFileEvaluator::absoluteFileValues( - const QString &variable, const QString &baseDirectory, const QStringList &searchDirs) const + const QString &variable, const QString &baseDirectory, const QStringList &searchDirs, + QHash *handled) const { QMakeVfs::VfsFlags flags = (d->m_cumulative ? QMakeVfs::VfsCumulative : QMakeVfs::VfsExact); QVector result; foreach (const ProString &str, d->values(ProKey(variable))) { + bool &seen = (*handled)[str]; + if (seen) + continue; + seen = true; const QString &el = d->m_option->expandEnvVars(str.toQString()); QString absEl; if (IoUtils::isAbsolutePath(el)) { diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h index c6d4a79cfa..a356dadaf7 100644 --- a/src/shared/proparser/profileevaluator.h +++ b/src/shared/proparser/profileevaluator.h @@ -85,7 +85,8 @@ public: const QString &variable, const QString &baseDirectory, const QString &buildDirectory) const; QStringList absolutePathValues(const QString &variable, const QString &baseDirectory) const; QVector absoluteFileValues( - const QString &variable, const QString &baseDirectory, const QStringList &searchDirs) const; + const QString &variable, const QString &baseDirectory, const QStringList &searchDirs, + QHash *handled) const; QString propertyValue(const QString &val) const; private: -- cgit v1.2.3