Merge remote-tracking branch 'origin/3.0'

Conflicts:
	qtcreator.pri
	src/plugins/qnx/qnxutils.cpp

Change-Id: I019ad21fb4c128eb736c8ab2d09310757e3be037
This commit is contained in:
Eike Ziller
2013-10-24 08:56:29 +02:00
192 changed files with 2423 additions and 1016 deletions

View File

@@ -175,6 +175,11 @@ static CppModelManagerInterface *g_instance = 0;
const QString CppModelManagerInterface::configurationFileName()
{ return CPlusPlus::Preprocessor::configurationFileName; }
const QString CppModelManagerInterface::editorConfigurationFileName()
{
return QLatin1String("<per-editor-defines>");
}
CppModelManagerInterface::CppModelManagerInterface(QObject *parent)
: QObject(parent)
{

View File

@@ -216,6 +216,7 @@ public:
public:
static const QString configurationFileName();
static const QString editorConfigurationFileName();
public:
CppModelManagerInterface(QObject *parent = 0);

View File

@@ -416,7 +416,6 @@ void CppPreprocessor::sourceNeeded(unsigned line, const QString &fileName, Inclu
if (m_dumpFileNameWhileParsing) {
qDebug() << "Parsing file:" << absoluteFileName
<< "contents:" << contents.size() << "bytes";
;
}
Document::Ptr doc = m_snapshot.document(absoluteFileName);

View File

@@ -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) {