forked from qt-creator/qt-creator
Utils: Rename QtcProcess::Result::Finished to FinishedWithSuccess
To make clear that this is not just any finish. Also change FinishedError to FinishedWithError, to create symmetry. Also adapt enum member description to reality. Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -153,7 +153,7 @@ bool BazaarClient::synchronousUncommit(const QString &workingDir,
|
||||
SynchronousProcess proc;
|
||||
vcsFullySynchronousExec(proc, workingDir, args);
|
||||
VcsOutputWindow::append(proc.stdOut());
|
||||
return proc.result() == QtcProcess::Finished;
|
||||
return proc.result() == QtcProcess::FinishedWithSuccess;
|
||||
}
|
||||
|
||||
void BazaarClient::commit(const QString &repositoryRoot, const QStringList &files,
|
||||
@@ -193,7 +193,7 @@ bool BazaarClient::managesFile(const QString &workingDirectory, const QString &f
|
||||
|
||||
SynchronousProcess proc;
|
||||
vcsFullySynchronousExec(proc, workingDirectory, args);
|
||||
if (proc.result() != QtcProcess::Finished)
|
||||
if (proc.result() != QtcProcess::FinishedWithSuccess)
|
||||
return false;
|
||||
return proc.rawStdOut().startsWith("unknown");
|
||||
}
|
||||
@@ -233,8 +233,8 @@ ExitCodeInterpreter BazaarClient::exitCodeInterpreter(VcsCommandTag cmd) const
|
||||
{
|
||||
if (cmd == DiffCommand) {
|
||||
return [](int code) {
|
||||
return (code < 0 || code > 2) ? QtcProcess::FinishedError
|
||||
: QtcProcess::Finished;
|
||||
return (code < 0 || code > 2) ? QtcProcess::FinishedWithError
|
||||
: QtcProcess::FinishedWithSuccess;
|
||||
};
|
||||
}
|
||||
return {};
|
||||
|
Reference in New Issue
Block a user