MCPcopy Create free account
hub / github.com/KDE/kdiff3 / width

Method width

src/diff.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41QSharedPointer<DiffBufferInfo> Diff3Line::m_pDiffBufferInfo = QSharedPointer<DiffBufferInfo>::create();
42
43qint32 LineData::width(qint32 tabSize) const
44{
45 const QString pLine = getLine();
46 qint32 w = 0;
47 qint32 j = 0;
48 for(qsizetype i = 0; i < size(); ++i)
49 {
50 if(pLine[i] == '\t')
51 {
52 for(j %= tabSize; j < tabSize; ++j)
53 ++w;
54 j = 0;
55 }
56 else
57 {
58 ++w;
59 ++j;
60 }
61 }
62 return w;
63}
64
65class StringIter {
66 QString::const_iterator ptr;

Callers 12

writeEntryMethod · 0.80
colorToPixmapFunction · 0.80
initViewMethod · 0.80
showMainWindowMethod · 0.80
slotFilePrintMethod · 0.80
slotFinishMainInitMethod · 0.80
resizeEventMethod · 0.80
paintMethod · 0.80
printWindowMethod · 0.80
prepareTextLayoutMethod · 0.80
resizeEventMethod · 0.80
setSelectionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected