diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2017-05-03 12:16:31 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2017-05-04 09:16:15 +0000 |
commit | 9ae5591956b261c969d454e792a3e887bdfadea6 (patch) | |
tree | ab60a320e80eb904248fc225ab59bb55d6a19b8c | |
parent | 1d160fb7d9ccaf0127f4243b78e67f8a65db6bc7 (diff) | |
download | qt-creator-9ae5591956b261c969d454e792a3e887bdfadea6.tar.gz |
Project: Skip duplicate files early
Change-Id: I9e2d8ce35c3f3901391c7494f1f3b60eee1bcd00
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/plugins/projectexplorer/project.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp index cd8e435f45..f12efd6d44 100644 --- a/src/plugins/projectexplorer/project.cpp +++ b/src/plugins/projectexplorer/project.cpp @@ -557,13 +557,13 @@ QStringList Project::files(Project::FilesMode fileMode, QSet<QString> alreadySeen; rootProjectNode()->forEachNode([&](const FileNode *fn) { - if (filter && !filter(fn)) - return; const QString path = fn->filePath().toString(); const int count = alreadySeen.count(); alreadySeen.insert(path); if (count == alreadySeen.count()) return; // skip duplicates + if (filter && !filter(fn)) + return; if ((fileMode == AllFiles) || (fileMode == SourceFiles && !fn->isGenerated()) || (fileMode == GeneratedFiles && fn->isGenerated())) |