forked from qt-creator/qt-creator
TextDocument: Make m_document a child of TextDocument
This is needed when moving TextDocument object between threads, otherwise all objects that are not children of the TextDocument (in terms of Qt's object hierarchy) will stay in the old thread. Change-Id: If5cc0151a5e4c1c7b69cf949bbb9cad317a44d17 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -208,6 +208,7 @@ void TextDocumentPrivate::updateRevisions()
|
||||
TextDocument::TextDocument(Id id)
|
||||
: d(new TextDocumentPrivate)
|
||||
{
|
||||
d->m_document.setParent(this);
|
||||
connect(&d->m_document, &QTextDocument::modificationChanged,
|
||||
this, &TextDocument::modificationChanged);
|
||||
connect(&d->m_document, &QTextDocument::contentsChanged,
|
||||
|
||||
Reference in New Issue
Block a user