QMake: Clean up Qmakestep

Change-Id: I3a2baa4e15a48f99652cec6151803f20341e339a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Tobias Hunger
2016-12-08 15:06:51 +01:00
parent 1ae34549b1
commit a2e3f716a8
2 changed files with 3 additions and 5 deletions

View File

@@ -336,8 +336,7 @@ void QMakeStep::startOneCommand(const QString &command, const QString &args)
pp->resolveAll();
QTC_ASSERT(!m_commandFuture || m_commandFuture->future().isFinished(), return);
delete m_commandFuture;
m_commandFuture = new QFutureInterface<bool>;
m_commandFuture.reset(new QFutureInterface<bool>);
m_commandWatcher.setFuture(m_commandFuture->future());
AbstractProcessStep::run(*m_commandFuture);
@@ -355,8 +354,7 @@ void QMakeStep::runNextCommand()
wasSuccess = false; // should not happen
}
delete m_commandFuture;
m_commandFuture = nullptr;
m_commandFuture.reset();
if (!wasSuccess)
m_nextState = State::POST_PROCESS;

View File

@@ -177,7 +177,7 @@ private:
QFutureInterface<bool> m_inputFuture;
QFutureWatcher<bool> m_inputWatcher;
QFutureInterface<bool> *m_commandFuture = nullptr;
std::unique_ptr<QFutureInterface<bool>> m_commandFuture;
QFutureWatcher<bool> m_commandWatcher;
// last values