diff --git a/src/libs/utils/shellcommandpage.cpp b/src/libs/utils/shellcommandpage.cpp index ada3537f8c3..554fe5b1c36 100644 --- a/src/libs/utils/shellcommandpage.cpp +++ b/src/libs/utils/shellcommandpage.cpp @@ -87,8 +87,12 @@ void ShellCommandPage::start(ShellCommand *command) QTC_ASSERT(m_state != Running, return); m_command = command; command->setProgressiveOutput(true); - connect(command, &ShellCommand::stdOutText, this, &ShellCommandPage::reportStdOut); - connect(command, &ShellCommand::stdErrText, this, &ShellCommandPage::reportStdErr); + connect(command, &ShellCommand::stdOutText, this, [this](const QString &text) { + m_formatter->appendMessage(text, Utils::StdOutFormat); + }); + connect(command, &ShellCommand::stdErrText, this, [this](const QString &text) { + m_formatter->appendMessage(text, Utils::StdErrFormat); + }); connect(command, &ShellCommand::finished, this, &ShellCommandPage::slotFinished); QApplication::setOverrideCursor(Qt::WaitCursor); m_logPlainTextEdit->clear(); @@ -130,16 +134,6 @@ void ShellCommandPage::slotFinished(bool ok, int exitCode, const QVariant &) emit finished(success); } -void ShellCommandPage::reportStdOut(const QString &text) -{ - m_formatter->appendMessage(text, Utils::StdOutFormat); -} - -void ShellCommandPage::reportStdErr(const QString &text) -{ - m_formatter->appendMessage(text, Utils::StdErrFormat); -} - void ShellCommandPage::terminate() { if (m_command) diff --git a/src/libs/utils/shellcommandpage.h b/src/libs/utils/shellcommandpage.h index ceb98d1821c..f716ab913b0 100644 --- a/src/libs/utils/shellcommandpage.h +++ b/src/libs/utils/shellcommandpage.h @@ -64,8 +64,6 @@ signals: private: void slotFinished(bool ok, int exitCode, const QVariant &cookie); - void reportStdOut(const QString &text); - void reportStdErr(const QString &text); QPlainTextEdit *m_logPlainTextEdit; OutputFormatter *m_formatter;