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()
|
void CMakeBuildStep::doRun()
|
||||||
{
|
{
|
||||||
// Make sure CMake state was written to disk before trying to build:
|
// Make sure CMake state was written to disk before trying to build:
|
||||||
m_waiting = false;
|
|
||||||
auto bs = static_cast<CMakeBuildSystem *>(buildSystem());
|
auto bs = static_cast<CMakeBuildSystem *>(buildSystem());
|
||||||
|
QString message;
|
||||||
if (bs->persistCMakeState()) {
|
if (bs->persistCMakeState()) {
|
||||||
emit addOutput(Tr::tr("Persisting CMake state..."), BuildStep::OutputFormat::NormalMessage);
|
message = Tr::tr("Persisting CMake state...");
|
||||||
m_waiting = true;
|
} else if (bs->isWaitingForParse()) {
|
||||||
} else if (buildSystem()->isWaitingForParse()) {
|
message = Tr::tr("Running CMake in preparation to build...");
|
||||||
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); });
|
|
||||||
} else {
|
} else {
|
||||||
runImpl();
|
runImpl();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
emit addOutput(message, OutputFormat::NormalMessage);
|
||||||
|
m_runTrigger = connect(target(), &Target::parsingFinished,
|
||||||
|
this, [this](bool success) { handleProjectWasParsed(success); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeBuildStep::runImpl()
|
void CMakeBuildStep::runImpl()
|
||||||
@@ -345,7 +342,6 @@ void CMakeBuildStep::runImpl()
|
|||||||
|
|
||||||
void CMakeBuildStep::handleProjectWasParsed(bool success)
|
void CMakeBuildStep::handleProjectWasParsed(bool success)
|
||||||
{
|
{
|
||||||
m_waiting = false;
|
|
||||||
disconnect(m_runTrigger);
|
disconnect(m_runTrigger);
|
||||||
if (isCanceled()) {
|
if (isCanceled()) {
|
||||||
emit finished(false);
|
emit finished(false);
|
||||||
|
@@ -102,7 +102,6 @@ private:
|
|||||||
Utils::StringAspect *m_cmakeArguments = nullptr;
|
Utils::StringAspect *m_cmakeArguments = nullptr;
|
||||||
Utils::StringAspect *m_toolArguments = nullptr;
|
Utils::StringAspect *m_toolArguments = nullptr;
|
||||||
Utils::BoolAspect *m_useiOSAutomaticProvisioningUpdates = nullptr;
|
Utils::BoolAspect *m_useiOSAutomaticProvisioningUpdates = nullptr;
|
||||||
bool m_waiting = false;
|
|
||||||
|
|
||||||
QString m_allTarget = "all";
|
QString m_allTarget = "all";
|
||||||
QString m_installTarget = "install";
|
QString m_installTarget = "install";
|
||||||
|
Reference in New Issue
Block a user