diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-10-25 21:24:34 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-11-01 17:37:06 +0000 |
commit | 4a59a7d714bdfdf54e279d6dc8de11383fff7ccd (patch) | |
tree | ff77a6ce4ef158ec7e8468fa149999851d9033a5 /src/shared/proparser | |
parent | 09b4d9d51be5e0db6bb9cba57caf9cfcab970164 (diff) |
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 <tobias.hunger@qt.io>
Diffstat (limited to 'src/shared/proparser')
-rw-r--r-- | src/shared/proparser/profileevaluator.cpp | 7 | ||||
-rw-r--r-- | src/shared/proparser/profileevaluator.h | 3 |
2 files changed, 8 insertions, 2 deletions
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::SourceFile> ProFileEvaluator::absoluteFileValues( - const QString &variable, const QString &baseDirectory, const QStringList &searchDirs) const + const QString &variable, const QString &baseDirectory, const QStringList &searchDirs, + QHash<ProString, bool> *handled) const { QMakeVfs::VfsFlags flags = (d->m_cumulative ? QMakeVfs::VfsCumulative : QMakeVfs::VfsExact); QVector<SourceFile> 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<SourceFile> absoluteFileValues( - const QString &variable, const QString &baseDirectory, const QStringList &searchDirs) const; + const QString &variable, const QString &baseDirectory, const QStringList &searchDirs, + QHash<ProString, bool> *handled) const; QString propertyValue(const QString &val) const; private: |