CMakePM: Refactor CMakeLists|Cache.txt as constants

Change-Id: I7165fa1d219a0c59bc519a9af1cd194414c4311c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2024-01-22 18:10:43 +01:00
parent b953735b22
commit 76a8966739
13 changed files with 39 additions and 25 deletions

View File

@@ -4,6 +4,7 @@
#include "projecttreehelper.h"
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include "cmakeprojectmanagertr.h"
#include <projectexplorer/projectexplorerconstants.h>
@@ -98,7 +99,7 @@ void addCMakePresets(FolderNode *root, const Utils::FilePath &sourceDir)
presetFileNames << "CMakeUserPresets.json";
const CMakeProject *cp = static_cast<const CMakeProject *>(
ProjectManager::projectForFile(sourceDir.pathAppended("CMakeLists.txt")));
ProjectManager::projectForFile(sourceDir.pathAppended(Constants::CMAKE_LISTS_TXT)));
if (cp && cp->presetsData().include)
presetFileNames.append(cp->presetsData().include.value());