Commit a44c403b authored by Tobias Hunger's avatar Tobias Hunger

ShellCommand: Rename some signals

Rename the signals used to report stdout/stderr to make it clearer
what they actually do. Remove some unimplemented private member
functions while at it.

Change-Id: I7e856f906ccb45964f3b1b64336d4d8ebca7b9ee
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent bba65155
......@@ -289,9 +289,9 @@ void ShellCommand::run(QFutureInterface<void> &future)
if (!d->m_aborted) {
if (!d->m_progressiveOutput) {
emit output(stdOut);
emit stdOutText(stdOut);
if (!stdErr.isEmpty())
emit errorText(stdErr);
emit stdErrText(stdErr);
}
emit finished(d->m_lastExecSuccess, d->m_lastExecExitCode, cookie());
......@@ -350,7 +350,7 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
if (!(d->m_flags & SuppressStdErr))
proxy->appendError(text);
if (d->m_progressiveOutput)
emit errorText(text);
emit stdErrText(text);
});
}
......@@ -366,7 +366,7 @@ Utils::SynchronousProcessResponse ShellCommand::runCommand(const Utils::FileName
if (d->m_flags & ShowStdOut)
proxy->append(text);
if (d->m_progressiveOutput) {
emit output(text);
emit stdOutText(text);
d->m_hadOutput = true;
}
});
......
......@@ -158,8 +158,8 @@ public slots:
void cancel();
signals:
void output(const QString &);
void errorText(const QString &);
void stdOutText(const QString &);
void stdErrText(const QString &);
void finished(bool ok, int exitCode, const QVariant &cookie);
void success(const QVariant &cookie);
......@@ -170,9 +170,6 @@ protected:
virtual void addTask(QFuture<void> &future);
private:
void bufferedOutput(const QString &text);
void bufferedError(const QString &text);
void run(QFutureInterface<void> &future);
SynchronousProcessResponse runSynchronous(const FileName &binary, const QStringList &arguments,
int timeoutS, ExitCodeInterpreter *interpreter = 0);
......
......@@ -152,7 +152,7 @@ void BaseController::runCommand(const QList<QStringList> &args, QTextCodec *code
m_command = new VcsCommand(m_directory, gitClient()->processEnvironment());
m_command->setCodec(codec ? codec : EditorManager::defaultTextCodec());
connect(m_command, &VcsCommand::output, this, &BaseController::processOutput);
connect(m_command, &VcsCommand::stdOutText, this, &BaseController::processOutput);
connect(m_command, &VcsCommand::finished, this, &BaseController::reloadFinished);
m_command->addFlags(diffExecutionFlags());
......@@ -476,8 +476,8 @@ public:
handler->setParent(command); // delete when command goes out of scope
command->addFlags(VcsCommand::ExpectRepoChanges);
connect(command, &VcsCommand::output, handler, &ConflictHandler::readStdOut);
connect(command, &VcsCommand::errorText, handler, &ConflictHandler::readStdErr);
connect(command, &VcsCommand::stdOutText, handler, &ConflictHandler::readStdOut);
connect(command, &VcsCommand::stdErrText, handler, &ConflictHandler::readStdErr);
}
static void handleResponse(const Utils::SynchronousProcessResponse &response,
......@@ -1467,7 +1467,7 @@ void GitClient::branchesForCommit(const QString &revision)
auto controller = qobject_cast<DiffEditorController *>(sender());
QString workingDirectory = controller->baseDirectory();
VcsCommand *command = vcsExec(workingDirectory, arguments, 0, false, 0, workingDirectory);
connect(command, &VcsCommand::output, controller,
connect(command, &VcsCommand::stdOutText, controller,
&DiffEditorController::informationForCommitReceived);
}
......
......@@ -234,7 +234,7 @@ void DiffController::postCollectTextualDiffOutput()
{
auto command = new VcsCommand(m_workingDirectory, processEnvironment());
command->setCodec(EditorManager::defaultTextCodec());
connect(command, &VcsCommand::output, this, &DiffController::slotTextualDiffOutputReceived);
connect(command, &VcsCommand::stdOutText, this, &DiffController::slotTextualDiffOutputReceived);
// command->addFlags(diffExecutionFlags());
QStringList args;
......
......@@ -95,8 +95,8 @@ void CheckoutProgressWizardPage::start(VcsCommand *command)
QTC_ASSERT(m_state != Running, return);
m_command = command;
command->setProgressiveOutput(true);
connect(command, &VcsCommand::output, this, &CheckoutProgressWizardPage::reportStdOut);
connect(command, &VcsCommand::errorText, this, &CheckoutProgressWizardPage::reportStdErr);
connect(command, &VcsCommand::stdOutText, this, &CheckoutProgressWizardPage::reportStdOut);
connect(command, &VcsCommand::stdErrText, this, &CheckoutProgressWizardPage::reportStdErr);
connect(command, &VcsCommand::finished, this, &CheckoutProgressWizardPage::slotFinished);
QApplication::setOverrideCursor(Qt::WaitCursor);
m_logPlainTextEdit->clear();
......
......@@ -148,7 +148,7 @@ VcsCommand *VcsBaseClientImpl::createCommand(const QString &workingDirectory,
if (editor) // assume that the commands output is the important thing
cmd->addFlags(VcsCommand::SilentOutput);
} else if (editor) {
connect(cmd, &VcsCommand::output, editor, &VcsBaseEditorWidget::setPlainText);
connect(cmd, &VcsCommand::stdOutText, editor, &VcsBaseEditorWidget::setPlainText);
}
return cmd;
......@@ -545,7 +545,7 @@ void VcsBaseClient::emitParsedStatus(const QString &repository, const QStringLis
QStringList args(vcsCommandString(StatusCommand));
args << extraOptions;
VcsCommand *cmd = createCommand(repository);
connect(cmd, &VcsCommand::output, this, &VcsBaseClient::statusParser);
connect(cmd, &VcsCommand::stdOutText, this, &VcsBaseClient::statusParser);
enqueueJob(cmd, args);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment