| 56 | } |
| 57 | |
| 58 | QVector<KDevelop::IProblem::Ptr> ProblemReporterModel::problems(const QSet<KDevelop::IndexedString>& docs) const |
| 59 | { |
| 60 | QVector<IProblem::Ptr> result; |
| 61 | DUChainReadLocker lock; |
| 62 | |
| 63 | for (const IndexedString& doc : docs) { |
| 64 | if (doc.isEmpty()) |
| 65 | continue; |
| 66 | |
| 67 | TopDUContext* ctx = DUChain::self()->chainForDocument(doc); |
| 68 | if (!ctx) |
| 69 | continue; |
| 70 | |
| 71 | const auto allProblems = DUChainUtils::allProblemsForContext(ctx); |
| 72 | result.reserve(result.size() + allProblems.size()); |
| 73 | for (const ProblemPointer& p : allProblems) { |
| 74 | result.append(p); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | return result; |
| 79 | } |
| 80 | |
| 81 | void ProblemReporterModel::forceFullUpdate() |
| 82 | { |
no test coverage detected