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

Method postProcessStdout

plugins/cppcheck/job.cpp:61–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void Job::postProcessStdout(const QStringList& lines)
62{
63 static const auto fileNameRegex = QRegularExpression(QStringLiteral("Checking ([^:]*)\\.{3}"));
64 static const auto percentRegex = QRegularExpression(QStringLiteral("(\\d+)% done"));
65
66 QRegularExpressionMatch match;
67
68 for (const QString& line : lines) {
69 match = fileNameRegex.match(line);
70 if (match.hasMatch()) {
71 emit infoMessage(this, match.captured(1));
72 continue;
73 }
74
75 match = percentRegex.match(line);
76 if (match.hasMatch()) {
77 setPercent(match.capturedView(1).toULong());
78 continue;
79 }
80 }
81
82 m_standardOutput << lines;
83
84 if (status() == KDevelop::OutputExecuteJob::JobStatus::JobRunning) {
85 KDevelop::OutputExecuteJob::postProcessStdout(lines);
86 }
87}
88
89void Job::postProcessStderr(const QStringList& lines)
90{

Callers 1

testJobMethod · 0.45

Calls 2

hasMatchMethod · 0.80
matchMethod · 0.45

Tested by 1

testJobMethod · 0.36