forked from qt-creator/qt-creator
		
	CppTools: fix inclusion of "injected" defines.
Task-number: QTCREATORBUG-10280 Change-Id: Ibc6ffeedb97a31a35a2d1f00625506f844692e16 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
		
				
					committed by
					
						
						Nikolai Kosjar
					
				
			
			
				
	
			
			
			
						parent
						
							336644a70d
						
					
				
				
					commit
					d57b405f29
				
			@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -153,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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user