diff options
author | Tobias Hunger <[email protected]> | 2015-04-27 15:03:07 +0200 |
---|---|---|
committer | Tobias Hunger <[email protected]> | 2015-05-04 15:27:25 +0000 |
commit | eec0a03212a13e5cf7377e5c7618471e546f787e (patch) | |
tree | e1dcaac87d1a4320eab2ddfd53ced0fd835fcb5c /src/plugins/vcsbase/vcsbaseclient.cpp | |
parent | 1e1fee86c43c70e6377b20d19e757b13137787ad (diff) |
Vcs: Split up VcsCommand
Move the biggest chunk into Utils::ShellCommand, add some Qt Creator
specific magic in Core::ShellCommand and leave the rest in
VcsBase::VcsCommand.
Change-Id: I5fe6f7076e96023ad2164bcfaacfb3b65a7ff8a8
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/vcsbase/vcsbaseclient.cpp')
-rw-r--r-- | src/plugins/vcsbase/vcsbaseclient.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 8d31beedd68..9cd0a36db44 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -144,9 +144,9 @@ VcsCommand *VcsBaseClientImpl::createCommand(const QString &workingDirectory, if (editor) d->bindCommandToEditor(cmd, editor); if (mode == VcsWindowOutputBind) { - cmd->addFlags(VcsBasePlugin::ShowStdOutInLogWindow); + cmd->addFlags(VcsCommand::ShowStdOut); if (editor) // assume that the commands output is the important thing - cmd->addFlags(VcsBasePlugin::SilentOutput); + cmd->addFlags(VcsCommand::SilentOutput); } else if (editor) { connect(cmd, &VcsCommand::output, editor, &VcsBaseEditorWidget::setPlainText); } @@ -211,7 +211,7 @@ bool VcsBaseClientImpl::vcsFullySynchronousExec(const QString &workingDir, const command->addFlags(flags); bool result = command->runFullySynchronous(vcsBinary(), args, vcsTimeoutS(), outputData, errorData ? errorData : &internalErrorData); - if (!internalErrorData.isEmpty() && !(flags & VcsBasePlugin::SuppressStdErrInLogWindow)) + if (!internalErrorData.isEmpty() && !(flags & VcsCommand::SuppressStdErr)) VcsOutputWindow::appendError(commandOutputFromLocal8Bit(internalErrorData)); return result; } @@ -394,9 +394,9 @@ bool VcsBaseClient::synchronousPull(const QString &workingDir, args << vcsCommandString(PullCommand) << extraOptions << srcLocation; // Disable UNIX terminals to suppress SSH prompting const unsigned flags = - VcsBasePlugin::SshPasswordPrompt - | VcsBasePlugin::ShowStdOutInLogWindow - | VcsBasePlugin::ShowSuccessMessage; + VcsCommand::SshPasswordPrompt + | VcsCommand::ShowStdOut + | VcsCommand::ShowSuccessMessage; const Utils::SynchronousProcessResponse resp = vcsSynchronousExec(workingDir, args, flags); const bool ok = resp.result == Utils::SynchronousProcessResponse::Finished; if (ok) @@ -412,9 +412,9 @@ bool VcsBaseClient::synchronousPush(const QString &workingDir, args << vcsCommandString(PushCommand) << extraOptions << dstLocation; // Disable UNIX terminals to suppress SSH prompting const unsigned flags = - VcsBasePlugin::SshPasswordPrompt - | VcsBasePlugin::ShowStdOutInLogWindow - | VcsBasePlugin::ShowSuccessMessage; + VcsCommand::SshPasswordPrompt + | VcsCommand::ShowStdOut + | VcsCommand::ShowSuccessMessage; const Utils::SynchronousProcessResponse resp = vcsSynchronousExec(workingDir, args, flags); return resp.result == Utils::SynchronousProcessResponse::Finished; } |