forked from qt-creator/qt-creator
VcsCommand: Get rid of setCookie()
Remove cookie arg from finished() signal, as it's not used currently. Thus, remove setCookie() method. Change-Id: Iedd328aece776eebd2d161a36ec28370b8bc4bfc Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -344,11 +344,8 @@ void GitBaseDiffEditorController::updateBranchList()
|
||||
if (revision.isEmpty())
|
||||
return;
|
||||
|
||||
const FilePath workingDirectory = baseDirectory();
|
||||
VcsCommand *command = m_instance->vcsExec(
|
||||
workingDirectory,
|
||||
{"branch", noColorOption, "-a", "--contains", revision}, nullptr,
|
||||
false, 0, workingDirectory.toString());
|
||||
VcsCommand *command = m_instance->vcsExec(baseDirectory(),
|
||||
{"branch", noColorOption, "-a", "--contains", revision});
|
||||
connect(command, &VcsCommand::stdOutText, this, [this](const QString &text) {
|
||||
const QString remotePrefix = "remotes/";
|
||||
const QString localPrefix = "<Local>";
|
||||
|
||||
@@ -194,11 +194,10 @@ void VcsBaseClientImpl::annotateRevisionRequested(const FilePath &workingDirecto
|
||||
VcsCommand *VcsBaseClientImpl::vcsExec(const FilePath &workingDirectory,
|
||||
const QStringList &arguments,
|
||||
VcsBaseEditorWidget *editor, bool useOutputToWindow,
|
||||
unsigned additionalFlags, const QVariant &cookie) const
|
||||
unsigned additionalFlags) const
|
||||
{
|
||||
VcsCommand *command = createCommand(workingDirectory, editor,
|
||||
useOutputToWindow ? VcsWindowOutputBind : NoOutputBind);
|
||||
command->setCookie(cookie);
|
||||
command->addFlags(additionalFlags);
|
||||
if (editor)
|
||||
command->setCodec(editor->codec());
|
||||
|
||||
@@ -115,8 +115,7 @@ public:
|
||||
const QStringList &arguments,
|
||||
VcsBaseEditorWidget *editor = nullptr,
|
||||
bool useOutputToWindow = false,
|
||||
unsigned additionalFlags = 0,
|
||||
const QVariant &cookie = {}) const;
|
||||
unsigned additionalFlags = 0) const;
|
||||
|
||||
protected:
|
||||
void resetCachedVcsInfo(const Utils::FilePath &workingDir);
|
||||
|
||||
@@ -105,7 +105,6 @@ public:
|
||||
QString m_displayName;
|
||||
const FilePath m_defaultWorkingDirectory;
|
||||
Environment m_environment;
|
||||
QVariant m_cookie;
|
||||
QTextCodec *m_codec = nullptr;
|
||||
ProgressParser *m_progressParser = nullptr;
|
||||
QFutureWatcher<void> m_watcher;
|
||||
@@ -325,7 +324,7 @@ void VcsCommand::run(QFutureInterface<void> &future)
|
||||
GlobalFileChangeBlocker::instance()->forceBlocked(false);
|
||||
});
|
||||
}
|
||||
emit finished(lastExecSuccess, d->m_cookie);
|
||||
emit finished(lastExecSuccess);
|
||||
if (lastExecSuccess)
|
||||
future.setProgressValue(future.progressMaximum());
|
||||
else
|
||||
@@ -440,11 +439,6 @@ void VcsCommand::runSynchronous(QtcProcess &process)
|
||||
process.runBlocking(EventLoopMode::On);
|
||||
}
|
||||
|
||||
void VcsCommand::setCookie(const QVariant &cookie)
|
||||
{
|
||||
d->m_cookie = cookie;
|
||||
}
|
||||
|
||||
void VcsCommand::setCodec(QTextCodec *codec)
|
||||
{
|
||||
d->m_codec = codec;
|
||||
|
||||
@@ -140,8 +140,6 @@ public:
|
||||
|
||||
void addFlags(unsigned f);
|
||||
|
||||
void setCookie(const QVariant &cookie);
|
||||
|
||||
void setCodec(QTextCodec *codec);
|
||||
|
||||
void setProgressParser(ProgressParser *parser);
|
||||
@@ -158,7 +156,7 @@ public:
|
||||
signals:
|
||||
void stdOutText(const QString &);
|
||||
void stdErrText(const QString &);
|
||||
void finished(bool success, const QVariant &cookie);
|
||||
void finished(bool success);
|
||||
|
||||
void terminate(); // Internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user