summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanager.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2016-12-06 11:00:27 +0100
committerNikolai Kosjar <nikolai.kosjar@qt.io>2016-12-08 08:52:17 +0000
commit05942b63f8bad6d6787fea10c31f10458cdccd06 (patch)
tree415f80fc4fda748880370cdb36dbf2313060d874 /src/plugins/cpptools/cppmodelmanager.cpp
parent3602033fcac19fed7491b1ff5173da6c58a47c34 (diff)
downloadqt-creator-05942b63f8bad6d6787fea10c31f10458cdccd06.tar.gz
CppTools: Do not put configuration document into global snapshot and working copy
These are remnants of the time when we had only one snapshot. Change-Id: I6ff4db645d1065a0ef195834890e0774e2e2c60e Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager.cpp')
-rw-r--r--src/plugins/cpptools/cppmodelmanager.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp
index 201af6f6a2..b2327f294e 100644
--- a/src/plugins/cpptools/cppmodelmanager.cpp
+++ b/src/plugins/cpptools/cppmodelmanager.cpp
@@ -593,11 +593,6 @@ WorkingCopy CppModelManager::buildWorkingCopyList()
workingCopy.insert(es->fileName(), es->contents(), es->revision());
}
- // Add the project configuration file
- QByteArray conf = codeModelConfiguration();
- conf += definedMacros();
- workingCopy.insert(configurationFileName(), conf);
-
return workingCopy;
}
@@ -850,12 +845,6 @@ QFuture<void> CppModelManager::updateProjectInfo(const ProjectInfo &newProjectIn
removeProjectInfoFilesAndIncludesFromSnapshot(oldProjectInfo);
filesToReindex.unite(newSourceFiles);
- // The "configuration file" includes all defines and therefore should be updated
- if (comparer.definesChanged()) {
- QMutexLocker snapshotLocker(&d->m_snapshotMutex);
- d->m_snapshot.remove(configurationFileName());
- }
-
// Otherwise check for added and modified files
} else {
const QSet<QString> addedFiles = comparer.addedFiles();
@@ -985,6 +974,9 @@ bool CppModelManager::isClangCodeModelActive() const
void CppModelManager::emitDocumentUpdated(Document::Ptr doc)
{
+ if (Client::isInjectedFile(doc->fileName()))
+ return;
+
if (replaceDocument(doc))
emit documentUpdated(doc);
}