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

Method parseNextLine

plugins/bazaar/bzrannotatejob.cpp:66–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void BzrAnnotateJob::parseNextLine()
67{
68 for(;;)
69 {
70 Q_ASSERT(m_currentLine<=m_outputLines.size());
71 if (m_currentLine == m_outputLines.size()) {
72 m_status = KDevelop::VcsJob::JobSucceeded;
73 emitResult();
74 emit resultsReady(this);
75 break;
76 }
77 const QStringView currentLine = m_outputLines.at(m_currentLine);
78 if (currentLine.isEmpty()) {
79 ++m_currentLine;
80 continue;
81 }
82 bool revOk;
83 const auto revision = leftOfNeedleOrEntireView(currentLine, QLatin1Char{' '}).toULong(&revOk);
84 if (!revOk) {
85 // Future compatibility - not a revision yet
86 ++m_currentLine;
87 continue;
88 }
89 auto i = m_commits.find(revision);
90 if (i != m_commits.end()) {
91 KDevelop::VcsAnnotationLine line;
92 line.setAuthor(i.value().author());
93 line.setCommitMessage(i.value().message());
94 line.setDate(i.value().date());
95 line.setLineNumber(m_currentLine);
96 line.setRevision(i.value().revision());
97 m_results.append(QVariant::fromValue(line));
98 ++m_currentLine;
99 continue;
100 } else {
101 prepareCommitInfo(revision);
102 break; //Will reenter this function when commit info will be ready
103 }
104 }
105}
106
107void BzrAnnotateJob::prepareCommitInfo(std::size_t revision)
108{

Callers

nothing calls this directly

Calls 15

leftOfNeedleOrEntireViewFunction · 0.85
setLineNumberMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45
isEmptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
setAuthorMethod · 0.45
authorMethod · 0.45
valueMethod · 0.45
setCommitMessageMethod · 0.45
messageMethod · 0.45

Tested by

no test coverage detected