forked from qt-creator/qt-creator
Help: Fix rendering images with litehtml
Creating the document parses it, which also populates the pixmap cache, so we may not clear the pixmap cache afterwards. Change-Id: I1e6d1669db898b1e50d59d135e52807afb307d09 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -848,11 +848,11 @@ void DocumentContainer::setScrollPosition(const QPoint &pos)
|
||||
m_scrollPosition = pos;
|
||||
}
|
||||
|
||||
void DocumentContainer::setDocument(litehtml::document::ptr document)
|
||||
void DocumentContainer::setDocument(const QByteArray &data, litehtml::context *context)
|
||||
{
|
||||
m_document = document;
|
||||
m_pixmaps.clear();
|
||||
m_selection = {};
|
||||
m_document = litehtml::document::createFromUTF8(data.constData(), this, context);
|
||||
}
|
||||
|
||||
litehtml::document::ptr DocumentContainer::document() const
|
||||
|
||||
Reference in New Issue
Block a user