From 8e653c60d63ef556c6e7c0d22c43b1e41fdec954 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 8 Jan 2024 14:00:03 +0100 Subject: [PATCH] ProjectExplorer: Don't burn step id into BuildStepFactory::m_creator This can be re-used in a (augmented) copy of the factory via BuildStepFactory::cloneStepCreator with the possibility to use a new step id in the new factory. In that case the new factory should create steps with the new id. Change-Id: I661537408e32fdeda9c45bde1abb54d32b9cbac6 Reviewed-by: hjk Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/buildstep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h index cdb3ad52f53..ed07d763e7a 100644 --- a/src/plugins/projectexplorer/buildstep.h +++ b/src/plugins/projectexplorer/buildstep.h @@ -155,8 +155,8 @@ protected: { QTC_CHECK(!m_creator); m_stepId = id; - m_creator = [id, this](BuildStepFactory *bsf, BuildStepList *bsl) { - auto bs = new BuildStepType(bsl, id); + m_creator = [](BuildStepFactory *bsf, BuildStepList *bsl) { + auto bs = new BuildStepType(bsl, bsf->m_stepId); if (bsf->m_extraInit) bsf->m_extraInit(bs); return bs;