forked from qt-creator/qt-creator
LanguageClient: guard client access in formatter
Change-Id: I76bd41b3a786b1893bc159e0363f90494fd14b9f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
|
||||
#include <texteditor/formatter.h>
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
namespace TextEditor { class TextDocument; }
|
||||
namespace LanguageClient {
|
||||
|
||||
@@ -26,7 +28,7 @@ private:
|
||||
void handleResponse(
|
||||
const LanguageServerProtocol::DocumentRangeFormattingRequest::Response &response);
|
||||
|
||||
Client *m_client = nullptr; // not owned
|
||||
QPointer<Client> m_client = nullptr; // not owned
|
||||
QMetaObject::Connection m_cancelConnection;
|
||||
TextEditor::TextDocument *m_document; // not owned
|
||||
bool m_ignoreCancel = false;
|
||||
|
||||
Reference in New Issue
Block a user