Clang: Add unsaved files messages

We have auto generated buffers from ui files which are not open but have no
file representation. So we need to provide them as unsaved files only.

Change-Id: I48a426c18e06eeda2fa707864f32f293e17ac651
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2015-08-31 16:10:36 +02:00
parent 3114780e55
commit 7eee8061f6
25 changed files with 662 additions and 69 deletions

View File

@@ -674,11 +674,11 @@ void ClangCompletionAssistProcessor::sendFileContent(const QString &projectPartI
const UnsavedFileContentInfo info = unsavedFileContent(customFileContent);
IpcCommunicator &ipcCommunicator = m_interface->ipcCommunicator();
ipcCommunicator.registerFilesForEditor({{m_interface->fileName(),
projectPartId,
Utf8String::fromByteArray(info.unsavedContent),
info.isDocumentModified,
uint(m_interface->textDocument()->revision())}});
ipcCommunicator.registerTranslationUnitsForEditor({{m_interface->fileName(),
projectPartId,
Utf8String::fromByteArray(info.unsavedContent),
info.isDocumentModified,
uint(m_interface->textDocument()->revision())}});
}
void ClangCompletionAssistProcessor::sendCompletionRequest(int position,