MCPcopy Create free account
hub / github.com/KDE/kate / formatHeader

Method formatHeader

apps/lib/diff/gitdiff.cpp:156–159  ·  view source on GitHub ↗

Creates a hunk header line (starting with @@) * * Note: The line will not end with a newline */

Source from the content-addressed store, hash-verified

154 *
155 * Note: The line will not end with a newline */
156QString DiffHunk::formatHeader(uint oldStart, uint oldCount, uint newStart, uint newCount, QString head)
157{
158 return QLatin1String("@@ -") + formatRange(oldStart, oldCount) + QLatin1String(" +") + formatRange(newStart, newCount) + QLatin1String(" @@") + head;
159}
160
161/**
162 * Parses a unified diff into a list of "diff hunks" (each hunk starts with a

Callers

nothing calls this directly

Calls 1

formatRangeFunction · 0.85

Tested by

no test coverage detected