MCPcopy Create free account
hub / github.com/KDE/kdevelop / problemExists

Method problemExists

plugins/compileanalyzercommon/compileanalyzeproblemmodel.cpp:42–55  ·  view source on GitHub ↗

The code is adapted version of cppcheck::ProblemModel::problemExists() TODO Add into KDevelop::ProblemModel class ?

Source from the content-addressed store, hash-verified

40// The code is adapted version of cppcheck::ProblemModel::problemExists()
41// TODO Add into KDevelop::ProblemModel class ?
42bool CompileAnalyzeProblemModel::problemExists(KDevelop::IProblem::Ptr newProblem)
43{
44 for (const auto& problem : std::as_const(m_problems)) {
45 if (newProblem->source() == problem->source() &&
46 newProblem->sourceString() == problem->sourceString() &&
47 newProblem->severity() == problem->severity() &&
48 newProblem->finalLocation() == problem->finalLocation() &&
49 newProblem->description() == problem->description() &&
50 newProblem->explanation() == problem->explanation())
51 return true;
52 }
53
54 return false;
55}
56
57// The code is adapted version of cppcheck::ProblemModel::addProblems()
58// TODO Add into KDevelop::ProblemModel class ?

Callers

nothing calls this directly

Calls 6

sourceMethod · 0.45
sourceStringMethod · 0.45
severityMethod · 0.45
finalLocationMethod · 0.45
descriptionMethod · 0.45
explanationMethod · 0.45

Tested by

no test coverage detected