aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/textdocumentlayout.h
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2023-08-02 13:56:28 +0200
committerDavid Schulz <david.schulz@qt.io>2023-08-04 11:20:18 +0000
commit66d49e6a53a9c535a9eb277f2bcd50e0fc3f4cfc (patch)
treeeae4f5457596fd5a9d24d25ffc83a8ea567cf9b0 /src/plugins/texteditor/textdocumentlayout.h
parent8d554aba1a00cbd31ea82b5dbf8450c4ae67ddf7 (diff)
TextEditor: Fix crash on reloading the document
as part of the reload operation we set the document to nullptr inside TextBlockUserData::documentClosing, but we do not remove the mark from the marks cache. So when a text mark gets deleted while a document is reloaded the mark does not get readded to the document, but it wont get removed from the marks cache inside the document either, so we have to manually make sure the mark is removed from the cache in this situation. Fixes: QTCREATORBUG-29432 Change-Id: I3ae4182c4d2bbd3426c1d7a60275d21ac20ea99a Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/texteditor/textdocumentlayout.h')
-rw-r--r--src/plugins/texteditor/textdocumentlayout.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/textdocumentlayout.h b/src/plugins/texteditor/textdocumentlayout.h
index 33387093da..427500a832 100644
--- a/src/plugins/texteditor/textdocumentlayout.h
+++ b/src/plugins/texteditor/textdocumentlayout.h
@@ -246,7 +246,7 @@ public:
QRectF blockBoundingRect(const QTextBlock &block) const override;
TextMarks documentClosing();
- void documentAboutToReload();
+ void documentAboutToReload(TextDocument *baseTextDocument);
void documentReloaded(TextDocument *baseextDocument);
void updateMarksLineNumber();
void updateMarksBlock(const QTextBlock &block);