Make QTextEngine::setAdditionalFormats() invalidate cached results

...which ensures we're not getting the formatting/rendering
artefacts in case of QStackTextEngine.

Change-Id: Ia0696a3e67eb866cf9776c6649c43775944edd1d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Konstantin Ritt 2014-03-15 01:20:36 +02:00 committed by The Qt Project
parent 946c092554
commit 4f2872c64f

View File

@ -2374,6 +2374,7 @@ void QTextEngine::freeMemory()
layoutData->hasBidi = false;
layoutData->layoutState = LayoutEmpty;
layoutData->haveCharAttributes = false;
layoutData->items.clear();
}
for (int i = 0; i < lines.size(); ++i) {
lines[i].justified = 0;
@ -2520,7 +2521,8 @@ void QTextEngine::setAdditionalFormats(const QList<QTextLayout::FormatRange> &fo
specialData->addFormats = formatList;
indexAdditionalFormats();
}
resetFontEngineCache();
invalidate();
clearLineData();
}
void QTextEngine::indexAdditionalFormats()