forked from qt-creator/qt-creator
CMakePM: Populate targets list on add new build step
The target list was recreated when the parsing of CMake project
finished.
But for already configured projects, the list was not used when
a new build step was added. This new step will only get the
targets list when the CMake project would be reparsed.
Fixes: QTCREATORBUG-25759
Change-Id: I54d12a71dacf9fcec2ad0f3e341fe8057880251d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
(cherry picked from commit a88f1426c3
)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -182,6 +182,9 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Utils::Id id) :
|
||||
m_buildTargetModel.setHeader({tr("Target")});
|
||||
|
||||
setBuildTargets({defaultBuildTarget()});
|
||||
auto *bs = qobject_cast<CMakeBuildSystem *>(buildSystem());
|
||||
if (bs && !bs->buildTargets().isEmpty())
|
||||
recreateBuildTargetsModel();
|
||||
|
||||
setLowPriority();
|
||||
|
||||
|
Reference in New Issue
Block a user