Clang: Use completion through backend process

This makes us independent of libclang crashes for completion.
Re-parsing for highlighting still happens in the Qt Creator process.

Run in verbose mode:
    qtc.clangcodemodel.ipc=true

Run tests:
    -test "ClangCodeModel"

Task-number: QTCREATORBUG-14108
Task-number: QTCREATORBUG-12819
Change-Id: Id3e95bd2afdb6508bbd1d35fddc69534a909b905
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-05-08 15:48:17 +02:00
parent 264132da27
commit 23b8a3b2e8
59 changed files with 3820 additions and 634 deletions

View File

@@ -91,7 +91,7 @@ public:
TextEditor::AssistInterface *createAssistInterface(
const QString &filePath,
QTextDocument *document,
const TextEditor::TextEditorWidget *textEditorWidget,
const CPlusPlus::LanguageFeatures &languageFeatures,
int position,
TextEditor::AssistReason reason) const override;
@@ -170,12 +170,12 @@ class CppCompletionAssistInterface : public TextEditor::AssistInterface
{
public:
CppCompletionAssistInterface(const QString &filePath,
QTextDocument *textDocument,
const TextEditor::TextEditorWidget *textEditorWidget,
const CPlusPlus::LanguageFeatures &languageFeatures,
int position,
TextEditor::AssistReason reason,
const WorkingCopy &workingCopy)
: TextEditor::AssistInterface(textDocument, position, filePath, reason)
: TextEditor::AssistInterface(textEditorWidget->document(), position, filePath, reason)
, m_gotCppSpecifics(false)
, m_workingCopy(workingCopy)
, m_languageFeatures(languageFeatures)