Commit 133b50ed authored by Marco Bubke's avatar Marco Bubke
Browse files

Clang: Don't update the translation unit for changing the current editor



It is generating reparsing steps.

Change-Id: Ibbdb2f5dceffdf940bbdf0c9a9f0a706124078f9
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 493a2a61
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment