diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-10-24 08:56:29 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-10-24 08:56:29 +0200 |
commit | c3119d1aa70a25ab7aeb39b0448c1d10c08aba6a (patch) | |
tree | c2204d569f87e28bc2e48a763650e1b99871f0ed /src/plugins/cpptools/cppsnapshotupdater.cpp | |
parent | 328daa9c5aa9a438a0187bb28e238396451f8548 (diff) | |
parent | b889bb1608badceed0dc1175f3322ea8015f8924 (diff) | |
download | qt-creator-c3119d1aa70a25ab7aeb39b0448c1d10c08aba6a.tar.gz |
Merge remote-tracking branch 'origin/3.0'
Conflicts:
qtcreator.pri
src/plugins/qnx/qnxutils.cpp
Change-Id: I019ad21fb4c128eb736c8ab2d09310757e3be037
Diffstat (limited to 'src/plugins/cpptools/cppsnapshotupdater.cpp')
-rw-r--r-- | src/plugins/cpptools/cppsnapshotupdater.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppsnapshotupdater.cpp b/src/plugins/cpptools/cppsnapshotupdater.cpp index cf4a7cec74..11cd3ff5b3 100644 --- a/src/plugins/cpptools/cppsnapshotupdater.cpp +++ b/src/plugins/cpptools/cppsnapshotupdater.cpp @@ -138,7 +138,8 @@ void SnapshotUpdater::update(CppModelManager::WorkingCopy workingCopy) workingCopy.insert(configurationFileName, m_configFile); m_snapshot.remove(m_fileInEditor); - static const QString editorDefinesFileName = QLatin1String("<per-editor-defines>"); + static const QString editorDefinesFileName + = CppModelManagerInterface::editorConfigurationFileName(); if (editorDefinesChanged) { m_snapshot.remove(editorDefinesFileName); workingCopy.insert(editorDefinesFileName, m_editorDefines); @@ -152,15 +153,21 @@ void SnapshotUpdater::update(CppModelManager::WorkingCopy workingCopy) preproc.setIncludePaths(m_includePaths); preproc.setFrameworkPaths(m_frameworkPaths); preproc.run(configurationFileName); - if (m_usePrecompiledHeaders) + if (m_usePrecompiledHeaders) { foreach (const QString &precompiledHeader, m_precompiledHeaders) preproc.run(precompiledHeader); + } if (!m_editorDefines.isEmpty()) preproc.run(editorDefinesFileName); preproc.run(m_fileInEditor); m_snapshot = preproc.snapshot(); - m_snapshot = m_snapshot.simplified(document()); + Snapshot newSnapshot = m_snapshot.simplified(document()); + for (Snapshot::const_iterator i = m_snapshot.begin(), ei = m_snapshot.end(); i != ei; ++i) { + if (Client::isInjectedFile(i.key())) + newSnapshot.insert(i.value()); + } + m_snapshot = newSnapshot; m_deps.build(m_snapshot); foreach (Document::Ptr doc, m_snapshot) { |