| 47 | } |
| 48 | |
| 49 | void TextDocumentModel::setDocument(QTextDocument *doc) |
| 50 | { |
| 51 | if (m_document) |
| 52 | disconnect(m_document, &QTextDocument::contentsChanged, this, &TextDocumentModel::documentChanged); |
| 53 | |
| 54 | m_document = doc; |
| 55 | fillModel(); |
| 56 | |
| 57 | if (m_document) |
| 58 | connect(m_document, &QTextDocument::contentsChanged, this, &TextDocumentModel::documentChanged); |
| 59 | } |
| 60 | |
| 61 | void TextDocumentModel::documentChanged() |
| 62 | { |
no outgoing calls