diff options
Diffstat (limited to 'src/gui/text/qtextlist.cpp')
-rw-r--r-- | src/gui/text/qtextlist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp index 5857afa048..25f2d7adf8 100644 --- a/src/gui/text/qtextlist.cpp +++ b/src/gui/text/qtextlist.cpp @@ -304,7 +304,7 @@ void QTextList::remove(const QTextBlock &block) QTextBlockFormat fmt = block.blockFormat(); fmt.setIndent(fmt.indent() + format().indent()); fmt.setObjectIndex(-1); - block.docHandle()->setBlockFormat(block, block, fmt, QTextDocumentPrivate::SetFormat); + const_cast<QTextDocumentPrivate *>(QTextDocumentPrivate::get(block))->setBlockFormat(block, block, fmt, QTextDocumentPrivate::SetFormat); } /*! @@ -316,7 +316,7 @@ void QTextList::add(const QTextBlock &block) { QTextBlockFormat fmt = block.blockFormat(); fmt.setObjectIndex(objectIndex()); - block.docHandle()->setBlockFormat(block, block, fmt, QTextDocumentPrivate::SetFormat); + const_cast<QTextDocumentPrivate *>(QTextDocumentPrivate::get(block))->setBlockFormat(block, block, fmt, QTextDocumentPrivate::SetFormat); } QT_END_NAMESPACE |