forked from qt-creator/qt-creator
CMakeBuildStep: Get rid of m_waiting field
Change-Id: Iea737960f57e93fa1e688ed43eedf1bf44204709 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -319,22 +319,19 @@ void CMakeBuildStep::setupOutputFormatter(Utils::OutputFormatter *formatter)
|
||||
void CMakeBuildStep::doRun()
|
||||
{
|
||||
// Make sure CMake state was written to disk before trying to build:
|
||||
m_waiting = false;
|
||||
auto bs = static_cast<CMakeBuildSystem *>(buildSystem());
|
||||
QString message;
|
||||
if (bs->persistCMakeState()) {
|
||||
emit addOutput(Tr::tr("Persisting CMake state..."), BuildStep::OutputFormat::NormalMessage);
|
||||
m_waiting = true;
|
||||
} else if (buildSystem()->isWaitingForParse()) {
|
||||
emit addOutput(Tr::tr("Running CMake in preparation to build..."), BuildStep::OutputFormat::NormalMessage);
|
||||
m_waiting = true;
|
||||
}
|
||||
|
||||
if (m_waiting) {
|
||||
m_runTrigger = connect(target(), &Target::parsingFinished,
|
||||
this, [this](bool success) { handleProjectWasParsed(success); });
|
||||
message = Tr::tr("Persisting CMake state...");
|
||||
} else if (bs->isWaitingForParse()) {
|
||||
message = Tr::tr("Running CMake in preparation to build...");
|
||||
} else {
|
||||
runImpl();
|
||||
return;
|
||||
}
|
||||
emit addOutput(message, OutputFormat::NormalMessage);
|
||||
m_runTrigger = connect(target(), &Target::parsingFinished,
|
||||
this, [this](bool success) { handleProjectWasParsed(success); });
|
||||
}
|
||||
|
||||
void CMakeBuildStep::runImpl()
|
||||
@@ -345,7 +342,6 @@ void CMakeBuildStep::runImpl()
|
||||
|
||||
void CMakeBuildStep::handleProjectWasParsed(bool success)
|
||||
{
|
||||
m_waiting = false;
|
||||
disconnect(m_runTrigger);
|
||||
if (isCanceled()) {
|
||||
emit finished(false);
|
||||
|
@@ -102,7 +102,6 @@ private:
|
||||
Utils::StringAspect *m_cmakeArguments = nullptr;
|
||||
Utils::StringAspect *m_toolArguments = nullptr;
|
||||
Utils::BoolAspect *m_useiOSAutomaticProvisioningUpdates = nullptr;
|
||||
bool m_waiting = false;
|
||||
|
||||
QString m_allTarget = "all";
|
||||
QString m_installTarget = "install";
|
||||
|
Reference in New Issue
Block a user