ClangTools: Attach ClangToolsProjectSettings data to project itself

Easier to reason about life time.

Change-Id: I2c61527532f6faa344fc59d858921e66daaf0b7e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-01-13 17:38:33 +01:00
parent 5a4b0b565a
commit 82265d51a7
10 changed files with 39 additions and 44 deletions

View File

@@ -360,7 +360,7 @@ static FileInfos sortedFileInfos(const QVector<CppTools::ProjectPart::Ptr> &proj
static RunSettings runSettings()
{
if (Project *project = SessionManager::startupProject()) {
auto *projectSettings = ClangToolsProjectSettingsManager::getSettings(project);
const auto projectSettings = ClangToolsProjectSettings::getSettings(project);
if (!projectSettings->useGlobalSettings())
return projectSettings->runSettings();
}
@@ -1075,7 +1075,7 @@ static FileInfos fileInfosMatchingEditedDocuments(const FileInfos &fileInfos)
FileInfoProviders ClangTool::fileInfoProviders(ProjectExplorer::Project *project,
const FileInfos &allFileInfos)
{
ClangToolsProjectSettings *s = ClangToolsProjectSettingsManager::getSettings(project);
const QSharedPointer<ClangToolsProjectSettings> s = ClangToolsProjectSettings::getSettings(project);
static FileInfoSelection openedFilesSelection;
static FileInfoSelection editeddFilesSelection;