summaryrefslogtreecommitdiff
path: root/src/plugins/cppcheck/cppchecktool.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2022-11-24 19:16:47 +0100
committerhjk <hjk@qt.io>2023-01-11 09:54:25 +0000
commitb87f0519e300c86ded0e4fd52379b0df0d996402 (patch)
treed261fc54e07a99454bd30b90c815451638b549d8 /src/plugins/cppcheck/cppchecktool.cpp
parent887db6b419b443bfd7f1fd7d95632d6ad18c603c (diff)
downloadqt-creator-b87f0519e300c86ded0e4fd52379b0df0d996402.tar.gz
CppEditor: Use FilePath for ProjectPath::m_sourceFiles
... and update using code. Change-Id: I682727a4b2982dba388e7cc7b9488225748d591f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cppcheck/cppchecktool.cpp')
-rw-r--r--src/plugins/cppcheck/cppchecktool.cpp12
1 files changed, 6 insertions, 6 deletions
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 <QThread>
+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<CppEditor::ProjectPart::ConstPtr, Utils::FilePaths> groups;
- for (const Utils::FilePath &file : std::as_const(filtered)) {
- const QString stringed = file.toString();
+ std::map<CppEditor::ProjectPart::ConstPtr, FilePaths> 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);
}