forked from qt-creator/qt-creator
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:
@@ -44,6 +44,7 @@
|
||||
|
||||
#include <projectexplorer/session.h>
|
||||
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <utils/mimetypes/mimedatabase.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/runextensions.h>
|
||||
@@ -76,13 +77,16 @@ public:
|
||||
|
||||
~CppEditorDocumentHandleImpl() { mm()->unregisterCppEditorDocument(m_registrationFilePath); }
|
||||
|
||||
QString filePath() const { return m_cppEditorDocument->filePath().toString(); }
|
||||
QByteArray contents() const { return m_cppEditorDocument->contentsText(); }
|
||||
unsigned revision() const { return m_cppEditorDocument->contentsRevision(); }
|
||||
QString filePath() const override { return m_cppEditorDocument->filePath().toString(); }
|
||||
QByteArray contents() const override { return m_cppEditorDocument->contentsText(); }
|
||||
unsigned revision() const override { return m_cppEditorDocument->contentsRevision(); }
|
||||
|
||||
CppTools::BaseEditorDocumentProcessor *processor()
|
||||
CppTools::BaseEditorDocumentProcessor *processor() const override
|
||||
{ return m_cppEditorDocument->processor(); }
|
||||
|
||||
void resetProcessor()
|
||||
{ m_cppEditorDocument->resetProcessor(); }
|
||||
|
||||
private:
|
||||
CppEditor::Internal::CppEditorDocument * const m_cppEditorDocument;
|
||||
// The file path of the editor document can change (e.g. by "Save As..."), so make sure
|
||||
|
||||
Reference in New Issue
Block a user