forked from qt-creator/qt-creator
eliminate duplicates from qmake spec and feature paths
potentially reduces the number of file::exists() calls
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user