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

Method setProblems

kdevplatform/shell/problemstore.cpp:74–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void ProblemStore::setProblems(const QVector<IProblem::Ptr> &problems)
75{
76 Q_D(ProblemStore);
77
78 int oldSize = d->m_allProblems.size();
79
80 // set signals block to prevent problemsChanged() emitting during clean
81 {
82 QSignalBlocker blocker(this);
83 clear();
84 }
85
86 for (const IProblem::Ptr& problem : problems) {
87 d->m_rootNode->addChild(new ProblemNode(d->m_rootNode, problem));
88 }
89
90 rebuild();
91
92 if (d->m_allProblems.size() != oldSize || d->m_allProblems != problems) {
93 d->m_allProblems = problems;
94 emit problemsChanged();
95 }
96}
97
98QVector<IProblem::Ptr> ProblemStore::problems(const KDevelop::IndexedString& document) const
99{

Callers 8

testSetProblemsMethod · 0.45
testNoGroupingMethod · 0.45
testPathGroupingMethod · 0.45
testSeverityGroupingMethod · 0.45
testPlaceholderTextMethod · 0.45
testNoGroupingMethod · 0.45
testPathGroupingMethod · 0.45
testSeverityGroupingMethod · 0.45

Calls 3

addChildMethod · 0.80
clearFunction · 0.70
sizeMethod · 0.45

Tested by 8

testSetProblemsMethod · 0.36
testNoGroupingMethod · 0.36
testPathGroupingMethod · 0.36
testSeverityGroupingMethod · 0.36
testPlaceholderTextMethod · 0.36
testNoGroupingMethod · 0.36
testPathGroupingMethod · 0.36
testSeverityGroupingMethod · 0.36