forked from qt-creator/qt-creator
AbstractProcessStep: Remove two virtual methods
Remove stdOutput() and stdError() virtual methods. Connect to addOutput() signal in subclasses instead and filter for desired channel. Change-Id: Ifd9a2e4ff037776caa706bbdb9634992060172ff Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -205,10 +205,12 @@ void AbstractProcessStep::doRun()
|
||||
d->m_process->setLowPriority();
|
||||
|
||||
connect(d->m_process.get(), &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||
stdOutput(d->stdoutStream->toUnicode(d->m_process->readAllStandardOutput()));
|
||||
emit addOutput(d->stdoutStream->toUnicode(d->m_process->readAllStandardOutput()),
|
||||
OutputFormat::Stdout, DontAppendNewline);
|
||||
});
|
||||
connect(d->m_process.get(), &QtcProcess::readyReadStandardError, this, [this] {
|
||||
stdError(d->stderrStream->toUnicode(d->m_process->readAllStandardError()));
|
||||
emit addOutput(d->stderrStream->toUnicode(d->m_process->readAllStandardError()),
|
||||
OutputFormat::Stderr, DontAppendNewline);
|
||||
});
|
||||
connect(d->m_process.get(), &QtcProcess::started, this, [this] {
|
||||
ProcessParameters *params = displayedParameters();
|
||||
@@ -326,28 +328,6 @@ void AbstractProcessStep::processStartupFailed()
|
||||
finish(false);
|
||||
}
|
||||
|
||||
/*!
|
||||
Called for each line of output on stdOut().
|
||||
|
||||
The default implementation adds the line to the application output window.
|
||||
*/
|
||||
|
||||
void AbstractProcessStep::stdOutput(const QString &output)
|
||||
{
|
||||
emit addOutput(output, OutputFormat::Stdout, DontAppendNewline);
|
||||
}
|
||||
|
||||
/*!
|
||||
Called for each line of output on StdErrror().
|
||||
|
||||
The default implementation adds the line to the application output window.
|
||||
*/
|
||||
|
||||
void AbstractProcessStep::stdError(const QString &output)
|
||||
{
|
||||
emit addOutput(output, OutputFormat::Stderr, DontAppendNewline);
|
||||
}
|
||||
|
||||
void AbstractProcessStep::finish(bool success)
|
||||
{
|
||||
emit finished(success);
|
||||
|
||||
Reference in New Issue
Block a user