forked from qt-creator/qt-creator
ShellCommand: Remove unused lastExecutionSuccess()
Change-Id: Ie518e6c45db1bc509f40be45925ae32b3d5bc180 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -92,7 +92,6 @@ public:
|
|||||||
int m_defaultTimeoutS = 10;
|
int m_defaultTimeoutS = 10;
|
||||||
int m_lastExecExitCode = -1;
|
int m_lastExecExitCode = -1;
|
||||||
|
|
||||||
bool m_lastExecSuccess = false;
|
|
||||||
bool m_progressiveOutput = false;
|
bool m_progressiveOutput = false;
|
||||||
bool m_hadOutput = false;
|
bool m_hadOutput = false;
|
||||||
bool m_aborted = false;
|
bool m_aborted = false;
|
||||||
@@ -196,7 +195,6 @@ void ShellCommand::addJob(const CommandLine &command, int timeoutS,
|
|||||||
|
|
||||||
void ShellCommand::execute()
|
void ShellCommand::execute()
|
||||||
{
|
{
|
||||||
d->m_lastExecSuccess = false;
|
|
||||||
d->m_lastExecExitCode = -1;
|
d->m_lastExecExitCode = -1;
|
||||||
|
|
||||||
if (d->m_jobs.empty())
|
if (d->m_jobs.empty())
|
||||||
@@ -239,11 +237,6 @@ FilePath ShellCommand::workDirectory(const FilePath &wd) const
|
|||||||
return defaultWorkingDirectory();
|
return defaultWorkingDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShellCommand::lastExecutionSuccess() const
|
|
||||||
{
|
|
||||||
return d->m_lastExecSuccess;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ShellCommand::lastExecutionExitCode() const
|
int ShellCommand::lastExecutionExitCode() const
|
||||||
{
|
{
|
||||||
return d->m_lastExecExitCode;
|
return d->m_lastExecExitCode;
|
||||||
@@ -264,7 +257,7 @@ void ShellCommand::run(QFutureInterface<void> &future)
|
|||||||
future.setProgressRange(0, 1);
|
future.setProgressRange(0, 1);
|
||||||
const int count = d->m_jobs.size();
|
const int count = d->m_jobs.size();
|
||||||
d->m_lastExecExitCode = -1;
|
d->m_lastExecExitCode = -1;
|
||||||
d->m_lastExecSuccess = true;
|
bool lastExecSuccess = true;
|
||||||
for (int j = 0; j < count; j++) {
|
for (int j = 0; j < count; j++) {
|
||||||
const Internal::ShellCommandPrivate::Job &job = d->m_jobs.at(j);
|
const Internal::ShellCommandPrivate::Job &job = d->m_jobs.at(j);
|
||||||
QtcProcess proc;
|
QtcProcess proc;
|
||||||
@@ -274,8 +267,8 @@ void ShellCommand::run(QFutureInterface<void> &future)
|
|||||||
stdOut += proc.cleanedStdOut();
|
stdOut += proc.cleanedStdOut();
|
||||||
stdErr += proc.cleanedStdErr();
|
stdErr += proc.cleanedStdErr();
|
||||||
d->m_lastExecExitCode = proc.exitCode();
|
d->m_lastExecExitCode = proc.exitCode();
|
||||||
d->m_lastExecSuccess = proc.result() == ProcessResult::FinishedWithSuccess;
|
lastExecSuccess = proc.result() == ProcessResult::FinishedWithSuccess;
|
||||||
if (!d->m_lastExecSuccess)
|
if (!lastExecSuccess)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,8 +279,8 @@ void ShellCommand::run(QFutureInterface<void> &future)
|
|||||||
emit stdErrText(stdErr);
|
emit stdErrText(stdErr);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit finished(d->m_lastExecSuccess, d->m_lastExecExitCode, cookie());
|
emit finished(lastExecSuccess, d->m_lastExecExitCode, cookie());
|
||||||
if (d->m_lastExecSuccess) {
|
if (lastExecSuccess) {
|
||||||
emit success(cookie());
|
emit success(cookie());
|
||||||
future.setProgressValue(future.progressMaximum());
|
future.setProgressValue(future.progressMaximum());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ public:
|
|||||||
const ExitCodeInterpreter &interpreter = {});
|
const ExitCodeInterpreter &interpreter = {});
|
||||||
void execute(); // Execute tasks asynchronously!
|
void execute(); // Execute tasks asynchronously!
|
||||||
void abort();
|
void abort();
|
||||||
bool lastExecutionSuccess() const;
|
|
||||||
int lastExecutionExitCode() const;
|
int lastExecutionExitCode() const;
|
||||||
|
|
||||||
const FilePath &defaultWorkingDirectory() const;
|
const FilePath &defaultWorkingDirectory() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user