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:
Marco Bubke
2015-12-01 15:05:31 +01:00
parent 493a2a6189
commit 133b50ed13
2 changed files with 1 additions and 15 deletions

View File

@@ -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();
}

View File

@@ -104,7 +104,6 @@ private:
private:
IpcCommunicator m_ipcCommunicator;
ClangCompletionAssistProvider m_completionAssistProvider;
QPointer<Core::IEditor> m_previousCppEditor;
};
class ModelManagerSupportProviderClang : public CppTools::ModelManagerSupportProvider