From 57f8033b7c1b26dfc91e257d1aaf9266ae67cc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 21 Apr 2009 12:08:17 +0200 Subject: Fix non-opaque text from widget palette being blitted, not blended. QPainter inherits some properties from the widget, among other font and pen. These are set in the painter's state in initFrom(), but in 4.5 we forgot to call QPaintEngineEx::penChanged() to let an extended paint engine know that the pen has changed. This caused the raster engine to believe it could blit non-opaque text, due to the fast_text flag not being correctly updated. Task-number: 251534 Reviewed-by: Paul --- src/gui/painting/qpainter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 2fa6a56..ffb273e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1484,7 +1484,9 @@ void QPainter::initFrom(const QWidget *widget) d->state->bgBrush = pal.brush(widget->backgroundRole()); d->state->deviceFont = QFont(widget->font(), const_cast (widget)); d->state->font = d->state->deviceFont; - if (d->engine) { + if (d->extended) { + d->extended->penChanged(); + } else if (d->engine) { d->engine->setDirty(QPaintEngine::DirtyPen); d->engine->setDirty(QPaintEngine::DirtyBrush); d->engine->setDirty(QPaintEngine::DirtyFont); -- cgit v0.12