forked from qt-creator/qt-creator
CppTools: Add API to set/query compiler call data
...and make some comparison functions public. Change-Id: If4c9a95031dece32073ce111484a890230190688 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
committed by
Fawzi Mohamed
parent
bb4a58304d
commit
33359a7922
@@ -629,21 +629,9 @@ public:
|
||||
, m_newSourceFiles(newProjectInfo.sourceFiles())
|
||||
{}
|
||||
|
||||
bool definesChanged() const
|
||||
{
|
||||
return m_new.defines() != m_old.defines();
|
||||
}
|
||||
|
||||
bool configurationChanged() const
|
||||
{
|
||||
return definesChanged()
|
||||
|| m_new.headerPaths() != m_old.headerPaths();
|
||||
}
|
||||
|
||||
bool nothingChanged() const
|
||||
{
|
||||
return !configurationChanged() && m_new.sourceFiles() == m_old.sourceFiles();
|
||||
}
|
||||
bool definesChanged() const { return m_new.definesChanged(m_old); }
|
||||
bool configurationChanged() const { return m_new.configurationChanged(m_old); }
|
||||
bool configurationOrFilesChanged() const { return m_new.configurationOrFilesChanged(m_old); }
|
||||
|
||||
QSet<QString> addedFiles() const
|
||||
{
|
||||
@@ -735,8 +723,12 @@ QFuture<void> CppModelManager::updateProjectInfo(const ProjectInfo &newProjectIn
|
||||
ProjectInfo oldProjectInfo = d->m_projectToProjectsInfo.value(project);
|
||||
if (oldProjectInfo.isValid()) {
|
||||
ProjectInfoComparer comparer(oldProjectInfo, newProjectInfo);
|
||||
if (comparer.nothingChanged())
|
||||
|
||||
if (!comparer.configurationOrFilesChanged()) {
|
||||
// Some other attached data might have changed
|
||||
d->m_projectToProjectsInfo.insert(project, newProjectInfo);
|
||||
return QFuture<void>();
|
||||
}
|
||||
|
||||
// If the project configuration changed, do a full reindexing
|
||||
if (comparer.configurationChanged()) {
|
||||
|
Reference in New Issue
Block a user