forked from qt-creator/qt-creator
		
	Merge the environment from the previous parse.
This commit is contained in:
		@@ -38,10 +38,20 @@ FastPreprocessor::FastPreprocessor(const Snapshot &snapshot)
 | 
			
		||||
 | 
			
		||||
QByteArray FastPreprocessor::run(QString fileName, const QString &source)
 | 
			
		||||
{
 | 
			
		||||
    if (Document::Ptr doc = _snapshot.value(fileName)) {
 | 
			
		||||
        _merged.insert(fileName);
 | 
			
		||||
 | 
			
		||||
        foreach (const Document::Include &i, doc->includes())
 | 
			
		||||
            mergeEnvironment(i.fileName());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const QByteArray preprocessed = _preproc(fileName, source);
 | 
			
		||||
    return preprocessed;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void FastPreprocessor::sourceNeeded(QString &fileName, IncludeType, unsigned)
 | 
			
		||||
{ mergeEnvironment(fileName); }
 | 
			
		||||
 | 
			
		||||
void FastPreprocessor::mergeEnvironment(const QString &fileName)
 | 
			
		||||
{
 | 
			
		||||
    if (! _merged.contains(fileName)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user