MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / formatResults

Method formatResults

tools/ProjectSearchTool.cpp:326–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326QString ProjectSearchTool::formatResults(const QList<SearchResult> &results, const QString &query)
327{
328 QString output = QString("Query: %1\n Found %2 matches:\n\n").arg(query).arg(results.size());
329 int count = 0;
330 for (const auto &r : results) {
331 if (++count > 100) {
332 output += QString("... and %1 more matches").arg(results.size() - 20);
333 break;
334 }
335 output += QString("%1:%2: %3\n").arg(r.relativePath).arg(r.lineNumber).arg(r.content);
336 }
337 return output;
338}
339
340} // namespace QodeAssist::Tools

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected