diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-11-03 13:52:52 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2015-11-04 09:10:01 +0000 |
commit | e1ed5e4804985487b536c2b8b58cd02413fe4104 (patch) | |
tree | 018dc42f0ba835accc050b2c09bd71e7d2a1f51b /src/plugins/cpptools/cpptoolsreuse.cpp | |
parent | 1bb16ad6b528ae87dcbbb1118510c3e13d815572 (diff) | |
download | qt-creator-e1ed5e4804985487b536c2b8b58cd02413fe4104.tar.gz |
FileUtils: Replace FileNameList with an alias
The functionality in that class is covered by initializers and
Utils::unique, so there is no need to keep a custom class.
This way FileNameList plays way nicer with utils/algorithm.h.
Change-Id: I8eeae6aca0558ecd998920c4fdfc5ea56bf75501
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsreuse.cpp')
-rw-r--r-- | src/plugins/cpptools/cpptoolsreuse.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp index f3a7942954..295ad45e30 100644 --- a/src/plugins/cpptools/cpptoolsreuse.cpp +++ b/src/plugins/cpptools/cpptoolsreuse.cpp @@ -39,6 +39,7 @@ #include <cplusplus/Overview.h> #include <cplusplus/LookupContext.h> +#include <utils/algorithm.h> #include <utils/qtcassert.h> #include <QDebug> @@ -290,11 +291,9 @@ bool skipFileDueToSizeLimit(const QFileInfo &fileInfo, int limitInMB) Utils::FileNameList modifiedFiles() { - Utils::FileNameList files; - foreach (Core::IDocument *doc, Core::DocumentManager::modifiedDocuments()) - files.append(doc->filePath()); - files.removeDuplicates(); - return files; + Utils::FileNameList files = Utils::transform(Core::DocumentManager::modifiedDocuments(), + &Core::IDocument::filePath); + return Utils::filteredUnique(files); } } // CppTools |