forked from qt-creator/qt-creator
ClangCodeModel: Keep a QPointer to the ClangdClient in ClangdTextMark
Apparently, the pointer might already be invalid when addToolTipContent() is called. Change-Id: I649bdca0945247b2b8ce4f709721c4d0bf96a11b Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
|
||||
#include <texteditor/textmark.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace LanguageClient { class Client; }
|
||||
@@ -77,7 +79,7 @@ private:
|
||||
|
||||
const LanguageServerProtocol::Diagnostic m_lspDiagnostic;
|
||||
const ClangBackEnd::DiagnosticContainer m_diagnostic;
|
||||
const LanguageClient::Client * const m_client;
|
||||
const QPointer<const LanguageClient::Client> m_client;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user