diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp index 8e988c09d66..4e64bb09eb7 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.cpp +++ b/src/plugins/projectexplorer/abstractprocessstep.cpp @@ -186,7 +186,7 @@ void AbstractProcessStep::run(QFutureInterface &fi) return; } - m_futureInterface.reset(&fi); + m_futureInterface = &fi; m_process.reset(new Utils::QtcProcess()); m_process->setUseCtrlCStub(Utils::HostOsInfo::isWindowsHost()); @@ -222,8 +222,7 @@ void AbstractProcessStep::cleanUp() m_process.reset(); // Report result - reportRunResult(*(m_futureInterface.get()), returnValue); - m_futureInterface.reset(); + reportRunResult(*m_futureInterface, returnValue); } /*! @@ -338,7 +337,7 @@ void AbstractProcessStep::stdError(const QString &line) QFutureInterface *AbstractProcessStep::futureInterface() const { - return m_futureInterface.get(); + return m_futureInterface; } void AbstractProcessStep::checkForCancel() diff --git a/src/plugins/projectexplorer/abstractprocessstep.h b/src/plugins/projectexplorer/abstractprocessstep.h index 8e8d3427811..847a2f4208a 100644 --- a/src/plugins/projectexplorer/abstractprocessstep.h +++ b/src/plugins/projectexplorer/abstractprocessstep.h @@ -89,7 +89,7 @@ private: void outputAdded(const QString &string, BuildStep::OutputFormat format); QTimer m_timer; - std::unique_ptr> m_futureInterface; + QFutureInterface *m_futureInterface; std::unique_ptr m_process; std::unique_ptr m_outputParserChain; ProcessParameters m_param;