| 41 | QSharedPointer<DiffBufferInfo> Diff3Line::m_pDiffBufferInfo = QSharedPointer<DiffBufferInfo>::create(); |
| 42 | |
| 43 | qint32 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 | |
| 65 | class StringIter { |
| 66 | QString::const_iterator ptr; |
no outgoing calls
no test coverage detected