forked from qt-creator/qt-creator
ShellCommand: De-virtualize postRunCommand()
Provide runCommandFinished() signal instead. Change-Id: I7c5e7d4aa484a7248dc369880343996e18c7c4b0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -223,11 +223,6 @@ void ShellCommand::cancel()
|
||||
emit terminate();
|
||||
}
|
||||
|
||||
void ShellCommand::postRunCommand(const FilePath &workingDirectory)
|
||||
{
|
||||
Q_UNUSED(workingDirectory)
|
||||
}
|
||||
|
||||
int ShellCommand::timeoutS() const
|
||||
{
|
||||
return std::accumulate(d->m_jobs.cbegin(), d->m_jobs.cend(), 0,
|
||||
@@ -337,7 +332,7 @@ void ShellCommand::runCommand(QtcProcess &proc,
|
||||
emit appendError(proc.exitMessage());
|
||||
}
|
||||
}
|
||||
postRunCommand(dir);
|
||||
emit runCommandFinished(dir);
|
||||
}
|
||||
|
||||
void ShellCommand::runFullySynchronous(QtcProcess &process)
|
||||
|
@@ -149,6 +149,7 @@ signals:
|
||||
void appendMessage(const QString &text);
|
||||
|
||||
void executedAsync(const QFuture<void> &future);
|
||||
void runCommandFinished(const Utils::FilePath &workingDirectory);
|
||||
|
||||
protected:
|
||||
void setEnvironment(const Environment &env);
|
||||
@@ -156,7 +157,6 @@ protected:
|
||||
int timeoutS() const;
|
||||
|
||||
private:
|
||||
virtual void postRunCommand(const Utils::FilePath &workDirectory);
|
||||
FilePath workDirectory(const FilePath &wd) const;
|
||||
void run(QFutureInterface<void> &future);
|
||||
|
||||
|
@@ -79,6 +79,7 @@ VcsCommand::VcsCommand(const FilePath &workingDirectory, const Environment &envi
|
||||
connect(this, &ShellCommand::appendMessage, outputWindow, &VcsOutputWindow::appendMessage);
|
||||
|
||||
connect(this, &ShellCommand::executedAsync, this, &VcsCommand::addTask);
|
||||
connect(this, &ShellCommand::runCommandFinished, this, &VcsCommand::postRunCommand);
|
||||
}
|
||||
|
||||
void VcsCommand::addTask(const QFuture<void> &future)
|
||||
|
@@ -41,7 +41,7 @@ private:
|
||||
const Utils::Environment &environment);
|
||||
|
||||
void addTask(const QFuture<void> &future);
|
||||
void postRunCommand(const Utils::FilePath &workDirectory) override;
|
||||
void postRunCommand(const Utils::FilePath &workDirectory);
|
||||
|
||||
QPointer<Core::FutureProgress> m_progress;
|
||||
bool m_preventRepositoryChanged;
|
||||
|
Reference in New Issue
Block a user