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

Method addProblems

plugins/compileanalyzercommon/compileanalyzeproblemmodel.cpp:59–79  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

57// The code is adapted version of cppcheck::ProblemModel::addProblems()
58// TODO Add into KDevelop::ProblemModel class ?
59void CompileAnalyzeProblemModel::addProblems(const QVector<KDevelop::IProblem::Ptr>& problems)
60{
61 if (m_problems.isEmpty()) {
62 m_maxProblemDescriptionLength = 0;
63 }
64
65 for (const auto& problem : problems) {
66 if (problemExists(problem)) {
67 continue;
68 }
69
70 m_problems.append(problem);
71 addProblem(problem);
72
73 // This performs adjusting of columns width in the ProblemsView
74 if (m_maxProblemDescriptionLength < problem->description().length()) {
75 m_maxProblemDescriptionLength = problem->description().length();
76 setProblems(m_problems);
77 }
78 }
79}
80
81void CompileAnalyzeProblemModel::finishAddProblems(bool jobSucceeded)
82{

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.45
appendMethod · 0.45
lengthMethod · 0.45
descriptionMethod · 0.45

Tested by

no test coverage detected