From b87f0519e300c86ded0e4fd52379b0df0d996402 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 24 Nov 2022 19:16:47 +0100 Subject: CppEditor: Use FilePath for ProjectPath::m_sourceFiles ... and update using code. Change-Id: I682727a4b2982dba388e7cc7b9488225748d591f Reviewed-by: Christian Kandeler --- src/plugins/cppcheck/cppchecktool.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/plugins/cppcheck/cppchecktool.cpp') diff --git a/src/plugins/cppcheck/cppchecktool.cpp b/src/plugins/cppcheck/cppchecktool.cpp index 0fb628b7ad..a5c3bc6afb 100644 --- a/src/plugins/cppcheck/cppchecktool.cpp +++ b/src/plugins/cppcheck/cppchecktool.cpp @@ -22,10 +22,11 @@ #include +using namespace Utils; + namespace Cppcheck::Internal { -CppcheckTool::CppcheckTool(CppcheckDiagnosticManager &manager, - const Utils::Id &progressId) : +CppcheckTool::CppcheckTool(CppcheckDiagnosticManager &manager, const Id &progressId) : m_manager(manager), m_progressRegexp("^.* checked (\\d+)% done$"), m_messageRegexp("^(.+),(\\d+),(\\w+),(\\w+),(.*)$"), @@ -194,13 +195,12 @@ void CppcheckTool::check(const Utils::FilePaths &files) return; } - std::map groups; - for (const Utils::FilePath &file : std::as_const(filtered)) { - const QString stringed = file.toString(); + std::map groups; + for (const FilePath &file : std::as_const(filtered)) { for (const CppEditor::ProjectPart::ConstPtr &part : parts) { using CppEditor::ProjectFile; QTC_ASSERT(part, continue); - const auto match = [stringed](const ProjectFile &pFile){return pFile.path == stringed;}; + const auto match = [file](const ProjectFile &pFile){return pFile.path == file;}; if (Utils::contains(part->files, match)) groups[part].push_back(file); } -- cgit v1.2.1