Clang: Use only one ClangProjectSettings instance per project

So far we've created ClangProjectSettings objects on demand. To get
change notifications there should be only one per project alive (and
accessible).

Change-Id: I757186ceaa642c6864d02946258cc6eb18064a52
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2018-01-22 16:31:05 +01:00
parent 384128662e
commit 2c74441260
5 changed files with 52 additions and 4 deletions

View File

@@ -25,6 +25,7 @@
#include "clangprojectsettingswidget.h"
#include "clangmodelmanagersupport.h"
#include "clangprojectsettings.h"
#include <coreplugin/icore.h>
@@ -52,7 +53,7 @@ static Core::Id configIdForProject(ClangProjectSettings &projectSettings)
}
ClangProjectSettingsWidget::ClangProjectSettingsWidget(ProjectExplorer::Project *project)
: m_projectSettings(project)
: m_projectSettings(ModelManagerSupportClang::instance()->projectSettings(project))
{
m_ui.setupUi(this);