From b6fb9e3e542fa2596a16006cec40ad75af4b6433 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh <orgad.shaneh@audiocodes.com> Date: Wed, 17 Jul 2013 22:27:35 +0300 Subject: [PATCH] VCS: Support silent output on runVcs Change-Id: If737b03f9d090076e9d739189479fb6725ae8856 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> --- src/plugins/vcsbase/vcsbaseplugin.cpp | 8 ++++++-- src/plugins/vcsbase/vcsbaseplugin.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 17b59e71c3d..c0312e2bdb7 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -871,8 +871,12 @@ static SynchronousProcessResponse runVcsFullySynchronously(const QString &workin if (!stdOut.isEmpty()) { response.stdOut = (outputCodec ? outputCodec->toUnicode(stdOut) : QString::fromLocal8Bit(stdOut)) .remove(QLatin1Char('\r')); - if (flags & VcsBasePlugin::ShowStdOutInLogWindow) - outputWindow->append(response.stdOut); + if (flags & VcsBasePlugin::ShowStdOutInLogWindow) { + if (flags & VcsBasePlugin::SilentOutput) + outputWindow->appendSilently(response.stdOut); + else + outputWindow->append(response.stdOut); + } } // Result diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h index 2e6a8705751..8c1f5fe39b1 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.h +++ b/src/plugins/vcsbase/vcsbaseplugin.h @@ -166,7 +166,8 @@ public: ForceCLocale = 0x80, // Force C-locale for commands whose output is parsed. FullySynchronously = 0x100, // Suppress local event loop (in case UI actions are // triggered by file watchers). - ExpectRepoChanges = 0x200 // Expect changes in repository by the command + ExpectRepoChanges = 0x200, // Expect changes in repository by the command + SilentOutput = 0x400 // With ShowStdOutInLogWindow - append output silently }; static Utils::SynchronousProcessResponse runVcs(const QString &workingDir, -- GitLab