Clang: Fix sending (un)register translation unit

Handle the following use cases:

  1. Editor is opened
    --> Register file at backend.

  2. Close editor for which a project part exists
    --> Unregister file with project part.

  3. Close editor for which no project part exists (anymore)
    --> Unregister file with empty/default project part.

Change-Id: I2b253004a920cccef989876538ab552eacf6b45c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-07-14 19:01:32 +02:00
parent 7e7e79dedc
commit c6b52267f4
6 changed files with 106 additions and 14 deletions

View File

@@ -86,6 +86,9 @@ ClangEditorDocumentParser::ClangEditorDocumentParser(const QString &filePath)
: BaseEditorDocumentParser(filePath)
, m_marker(new ClangCodeModel::SemanticMarker)
{
BaseEditorDocumentParser::Configuration config = configuration();
config.stickToPreviousProjectPart = false;
setConfiguration(config);
}
void ClangEditorDocumentParser::updateHelper(const BaseEditorDocumentParser::InMemoryInfo &info)