| 59 | } |
| 60 | |
| 61 | void 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 | |
| 89 | void Job::postProcessStderr(const QStringList& lines) |
| 90 | { |