aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/shellcommandpage.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-01-26 22:57:51 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-01-27 08:19:15 +0000
commit048a012d21be2de5d836fead728c4d2deaf7f78e (patch)
tree12d44c004645f8c749b605ce9d4a3a7336be3001 /src/libs/utils/shellcommandpage.cpp
parent9ff5786d533e094ec447f0c0630856e5da59c3c2 (diff)
Utils: Minor cleanup in ShellCommandPage
Change-Id: I4991caf2b96ccbcfe3ef763370c68678cd2e1424 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/shellcommandpage.cpp')
-rw-r--r--src/libs/utils/shellcommandpage.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/libs/utils/shellcommandpage.cpp b/src/libs/utils/shellcommandpage.cpp
index ada3537f8c..554fe5b1c3 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)