VcsBase: Get rid of RunFlags::SilentOutput

In theory in was used only when we passed a non-null
editor together with CommandOutputBindMode::ToVcsWindow
into VcsBaseClientImpl::createCommand(). But there was no
such a case in the whole codebase.

Change-Id: I4b1162141e0849b49c12ee464e635debb62d5353
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-12-09 13:59:12 +01:00
parent 8d7ced7d83
commit 1caade7333
2 changed files with 5 additions and 10 deletions

View File

@@ -142,12 +142,8 @@ void VcsCommandPrivate::installStdCallbacks(QtcProcess *process)
|| m_flags & RunFlags::ShowStdOut) { || m_flags & RunFlags::ShowStdOut) {
process->setTextChannelMode(Channel::Output, TextChannelMode::MultiLine); process->setTextChannelMode(Channel::Output, TextChannelMode::MultiLine);
connect(process, &QtcProcess::textOnStandardOutput, this, [this](const QString &text) { connect(process, &QtcProcess::textOnStandardOutput, this, [this](const QString &text) {
if (m_flags & RunFlags::ShowStdOut) { if (m_flags & RunFlags::ShowStdOut)
if (m_flags & RunFlags::SilentOutput) VcsOutputWindow::append(text);
VcsOutputWindow::appendSilently(text);
else
VcsOutputWindow::append(text);
}
if (m_flags & RunFlags::ProgressiveOutput) if (m_flags & RunFlags::ProgressiveOutput)
emit q->stdOutText(text); emit q->stdOutText(text);
}); });

View File

@@ -8,7 +8,7 @@
namespace VcsBase { namespace VcsBase {
enum class RunFlags { enum class RunFlags {
None = 0, // Empty. None = 0, // Empty.
// QtcProcess related // QtcProcess related
MergeOutputChannels = (1 << 0), // See QProcess::ProcessChannelMode::MergedChannels. MergeOutputChannels = (1 << 0), // See QProcess::ProcessChannelMode::MergedChannels.
ForceCLocale = (1 << 1), // Force C-locale, sets LANG and LANGUAGE env vars to "C". ForceCLocale = (1 << 1), // Force C-locale, sets LANG and LANGUAGE env vars to "C".
@@ -20,9 +20,8 @@ enum class RunFlags {
SuppressCommandLogging = (1 << 5), // No starting command log entry. SuppressCommandLogging = (1 << 5), // No starting command log entry.
ShowSuccessMessage = (1 << 6), // Show message about successful completion of command. ShowSuccessMessage = (1 << 6), // Show message about successful completion of command.
ShowStdOut = (1 << 7), // Show standard output. ShowStdOut = (1 << 7), // Show standard output.
SilentOutput = (1 << 8), // Only when ShowStdOut is set to true, outputs silently. ProgressiveOutput = (1 << 8), // Emit stdOutText() and stdErrText() signals.
ProgressiveOutput = (1 << 9), // Emit stdOutText() and stdErrText() signals. ExpectRepoChanges = (1 << 9), // Expect changes in repository by the command.
ExpectRepoChanges = (1 << 10), // Expect changes in repository by the command.
NoOutput = SuppressStdErr | SuppressFailMessage | SuppressCommandLogging NoOutput = SuppressStdErr | SuppressFailMessage | SuppressCommandLogging
}; };