forked from qt-creator/qt-creator
AbstractProcessStep: Get rid of done hook
Not needed anymore. Remove emitting 100% progress on finish of CMakeInstallStep, as that's done automatically by the task tree. Task-number: QTCREATORBUG-29168 Change-Id: If93d989eeb0a551f00754c5d6ef7f180fdbabdd5 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -38,7 +38,6 @@ public:
|
|||||||
cmakeArguments.setDisplayStyle(StringAspect::LineEditDisplay);
|
cmakeArguments.setDisplayStyle(StringAspect::LineEditDisplay);
|
||||||
|
|
||||||
setCommandLineProvider([this] { return cmakeCommand(); });
|
setCommandLineProvider([this] { return cmakeCommand(); });
|
||||||
setDoneHook([this](bool) { emit progress(100, {}); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -82,7 +82,6 @@ public:
|
|||||||
std::function<CommandLine()> m_commandLineProvider;
|
std::function<CommandLine()> m_commandLineProvider;
|
||||||
std::function<FilePath()> m_workingDirectoryProvider;
|
std::function<FilePath()> m_workingDirectoryProvider;
|
||||||
std::function<void(Environment &)> m_environmentModifier;
|
std::function<void(Environment &)> m_environmentModifier;
|
||||||
std::function<void(bool)> m_doneHook; // TODO: Remove me when all subclasses moved to Tasking
|
|
||||||
bool m_ignoreReturnValue = false;
|
bool m_ignoreReturnValue = false;
|
||||||
bool m_lowPriority = false;
|
bool m_lowPriority = false;
|
||||||
std::unique_ptr<QTextDecoder> stdoutStream;
|
std::unique_ptr<QTextDecoder> stdoutStream;
|
||||||
@@ -132,11 +131,6 @@ void AbstractProcessStep::setUseEnglishOutput()
|
|||||||
d->m_environmentModifier = [](Environment &env) { env.setupEnglishOutput(); };
|
d->m_environmentModifier = [](Environment &env) { env.setupEnglishOutput(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractProcessStep::setDoneHook(const std::function<void(bool)> &doneHook)
|
|
||||||
{
|
|
||||||
d->m_doneHook = doneHook;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractProcessStep::setCommandLineProvider(const std::function<CommandLine()> &provider)
|
void AbstractProcessStep::setCommandLineProvider(const std::function<CommandLine()> &provider)
|
||||||
{
|
{
|
||||||
d->m_commandLineProvider = provider;
|
d->m_commandLineProvider = provider;
|
||||||
@@ -362,8 +356,6 @@ void AbstractProcessStep::finish(ProcessResult result)
|
|||||||
{
|
{
|
||||||
const bool success = result == ProcessResult::FinishedWithSuccess
|
const bool success = result == ProcessResult::FinishedWithSuccess
|
||||||
|| (result == ProcessResult::FinishedWithError && d->m_ignoreReturnValue);
|
|| (result == ProcessResult::FinishedWithError && d->m_ignoreReturnValue);
|
||||||
if (d->m_doneHook)
|
|
||||||
d->m_doneHook(success);
|
|
||||||
emit finished(success);
|
emit finished(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@ protected:
|
|||||||
bool setupProcessParameters(ProcessParameters *params) const;
|
bool setupProcessParameters(ProcessParameters *params) const;
|
||||||
bool ignoreReturnValue() const;
|
bool ignoreReturnValue() const;
|
||||||
void setIgnoreReturnValue(bool b);
|
void setIgnoreReturnValue(bool b);
|
||||||
void setDoneHook(const std::function<void(bool)> &doneHook);
|
|
||||||
void setCommandLineProvider(const std::function<Utils::CommandLine()> &provider);
|
void setCommandLineProvider(const std::function<Utils::CommandLine()> &provider);
|
||||||
void setWorkingDirectoryProvider(const std::function<Utils::FilePath()> &provider);
|
void setWorkingDirectoryProvider(const std::function<Utils::FilePath()> &provider);
|
||||||
void setEnvironmentModifier(const std::function<void(Utils::Environment &)> &modifier);
|
void setEnvironmentModifier(const std::function<void(Utils::Environment &)> &modifier);
|
||||||
|
Reference in New Issue
Block a user