CMakePM: Fix assert with non CMake projects

Amends 7028e27a81

Change-Id: I5d1e29abf19135aea8a401f2b971767f8a308c28
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Cristian Adam
2023-10-04 15:51:38 +02:00
parent ae4852a3ea
commit f81bf72924

View File

@@ -167,7 +167,8 @@ CMakeManager::CMakeManager()
connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] {
updateCmakeActions(ProjectTree::currentNode());
auto cmakeBuildSystem = static_cast<CMakeBuildSystem*>(ProjectManager::startupBuildSystem());
auto cmakeBuildSystem = qobject_cast<CMakeBuildSystem *>(
ProjectManager::startupBuildSystem());
if (cmakeBuildSystem) {
const BuildDirParameters parameters(cmakeBuildSystem);
const auto tool = parameters.cmakeTool();