Revert "Utils: Replace SynchronousCommand::flags by a named bool"

This reverts commit c617632e4d9291f1b50ec0c7e1a914a6a689284e.

To early, dependencies missing.

Change-Id: I91433aebbaf2c04cbb212585deb3cde5f3208974
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2021-05-07 10:25:38 +02:00
parent 9a7a0098a3
commit 635993fbdc
8 changed files with 37 additions and 21 deletions

View File

@@ -41,7 +41,6 @@ VcsCommand::VcsCommand(const QString &workingDirectory, const Environment &envir
m_preventRepositoryChanged(false)
{
VcsOutputWindow::setRepository(workingDirectory);
setDisableUnixTerminal();
setOutputProxyFactory([this] {
auto proxy = new OutputProxy;
VcsOutputWindow *outputWindow = VcsOutputWindow::instance();
@@ -95,6 +94,14 @@ void VcsCommand::emitRepositoryChanged(const QString &workingDirectory)
Core::VcsManager::emitRepositoryChanged(workDirectory(workingDirectory));
}
unsigned VcsCommand::processFlags() const
{
unsigned processFlags = 0;
if (!VcsBase::sshPrompt().isEmpty() && (flags() & SshPasswordPrompt))
processFlags |= SynchronousProcess::UnixTerminalDisabled;
return processFlags;
}
void VcsCommand::coreAboutToClose()
{
m_preventRepositoryChanged = true;

View File

@@ -51,6 +51,7 @@ public:
const Utils::ExitCodeInterpreter &interpreter = Utils::defaultExitCodeInterpreter) override;
private:
unsigned processFlags() const override;
void emitRepositoryChanged(const QString &workingDirectory);
void coreAboutToClose() override;