forked from qt-creator/qt-creator
		
	Clang: Only apply fixits to the corresponding revision
Change-Id: I4f4136369e1b261338d444670c212565e0c6b824 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
		
				
					committed by
					
						
						Nikolai Kosjar
					
				
			
			
				
	
			
			
			
						parent
						
							8345ba2d2d
						
					
				
				
					commit
					bd10e9b020
				
			@@ -197,6 +197,15 @@ void ModelManagerSupportClang::onCppDocumentReloadFinishedOnTranslationUnit(bool
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
namespace {
 | 
			
		||||
void clearDiagnosticFixIts(const QString &filePath)
 | 
			
		||||
{
 | 
			
		||||
    auto processor = ClangEditorDocumentProcessor::get(filePath);
 | 
			
		||||
    if (processor)
 | 
			
		||||
        processor->clearDiagnosticsWithFixIts();
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ModelManagerSupportClang::onCppDocumentContentsChangedOnTranslationUnit(int position,
 | 
			
		||||
                                                                             int /*charsRemoved*/,
 | 
			
		||||
                                                                             int /*charsAdded*/)
 | 
			
		||||
@@ -206,6 +215,8 @@ void ModelManagerSupportClang::onCppDocumentContentsChangedOnTranslationUnit(int
 | 
			
		||||
    m_ipcCommunicator.updateChangeContentStartPosition(document->filePath().toString(),
 | 
			
		||||
                                                       position);
 | 
			
		||||
    m_ipcCommunicator.updateTranslationUnitIfNotCurrentDocument(document);
 | 
			
		||||
 | 
			
		||||
    clearDiagnosticFixIts(document->filePath().toString());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void ModelManagerSupportClang::onCppDocumentAboutToReloadOnUnsavedFile()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user