MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / readLine

Method readLine

src/plugins/git/utils/diffutils.cpp:683–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681}
682
683QString GitDiffWorker::readLine(const QString &text, QString *remainingText, bool *hasNewLine)
684{
685 const QChar newLine('\n');
686 const int indexOfFirstNewLine = text.indexOf(newLine);
687 if (indexOfFirstNewLine < 0) {
688 if (remainingText)
689 *remainingText = QString();
690 if (hasNewLine)
691 *hasNewLine = false;
692 return text;
693 }
694
695 if (hasNewLine)
696 *hasNewLine = true;
697
698 if (remainingText)
699 *remainingText = text.mid(indexOfFirstNewLine + 1);
700
701 return text.left(indexOfFirstNewLine);
702}
703
704QList<RowData> GitDiffWorker::readLines(const QString &patch, bool lastChunk, bool *lastChunkAtTheEndOfFile, bool *ok)
705{

Callers 15

readNextMethod · 0.45
readMethod · 0.45
readLineDataMethod · 0.45
loadMethod · 0.45
configureMethod · 0.45
submoduleRemoveMethod · 0.45
fillIssueTypeComboBoxMethod · 0.45
tools.cppFile · 0.45
doReadStdoutLineMethod · 0.45
execCommandMethod · 0.45

Calls 3

leftMethod · 0.80
QStringClass · 0.50
indexOfMethod · 0.45

Tested by

no test coverage detected