From 45cc9df8a2d1590714f21d157dc5565c68e647f3 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Date: Thu, 21 Jan 2010 18:24:46 +0100 Subject: [PATCH] eliminate duplicates from qmake spec and feature paths potentially reduces the number of file::exists() calls --- src/shared/proparser/profileevaluator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index af97e7fd2f0..e21fbb1422a 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -1196,7 +1196,9 @@ QStringList ProFileEvaluator::Private::qmakeMkspecPaths() const foreach (const QString &it, QString::fromLocal8Bit(qmakepath).split(m_option->dirlist_sep)) ret << QDir::cleanPath(it) + concat; - ret << propertyValue(QLatin1String("QT_INSTALL_DATA")) + concat; + QString builtIn = propertyValue(QLatin1String("QT_INSTALL_DATA")) + concat; + if (!ret.contains(builtIn)) + ret << builtIn; return ret; } @@ -1284,6 +1286,8 @@ QStringList ProFileEvaluator::Private::qmakeFeaturePaths() const if (!feature_roots.at(i).endsWith((ushort)'/')) feature_roots[i].append((ushort)'/'); + feature_roots.removeDuplicates(); + return feature_roots; } -- GitLab