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

Method formatHeader

kdevplatform/vcs/vcsdiff.cpp:138–142  ·  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

136 *
137 * Note: The line will not end with a newline */
138 QString DiffHunk::formatHeader(uint oldStart, uint oldCount, uint newStart, uint newCount, QString head)
139 {
140 return QLatin1String("@@ -") + formatRange(oldStart, oldCount) + QLatin1String(" +")
141 + formatRange(newStart, newCount) + QLatin1String(" @@") + head;
142 }
143
144 /**
145 * 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