forked from qt-creator/qt-creator
Clang: Don't update the translation unit for changing the current editor
It is generating reparsing steps. Change-Id: Ibbdb2f5dceffdf940bbdf0c9a9f0a706124078f9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -102,21 +102,8 @@ CppTools::BaseEditorDocumentProcessor *ModelManagerSupportClang::editorDocumentP
|
||||
return new ClangEditorDocumentProcessor(this, baseTextDocument);
|
||||
}
|
||||
|
||||
void ModelManagerSupportClang::onCurrentEditorChanged(Core::IEditor *newCurrent)
|
||||
void ModelManagerSupportClang::onCurrentEditorChanged(Core::IEditor *)
|
||||
{
|
||||
// If we switch away from a cpp editor, update the backend about
|
||||
// the document's unsaved content.
|
||||
if (m_previousCppEditor && m_previousCppEditor->document()->isModified()) {
|
||||
m_ipcCommunicator.updateTranslationUnitFromCppEditorDocument(
|
||||
m_previousCppEditor->document()->filePath().toString());
|
||||
}
|
||||
|
||||
// Remember previous editor
|
||||
if (newCurrent && cppModelManager()->isCppEditor(newCurrent))
|
||||
m_previousCppEditor = newCurrent;
|
||||
else
|
||||
m_previousCppEditor.clear();
|
||||
|
||||
m_ipcCommunicator.updateTranslationUnitVisiblity();
|
||||
}
|
||||
|
||||
|
@@ -104,7 +104,6 @@ private:
|
||||
private:
|
||||
IpcCommunicator m_ipcCommunicator;
|
||||
ClangCompletionAssistProvider m_completionAssistProvider;
|
||||
QPointer<Core::IEditor> m_previousCppEditor;
|
||||
};
|
||||
|
||||
class ModelManagerSupportProviderClang : public CppTools::ModelManagerSupportProvider
|
||||
|
Reference in New Issue
Block a user