diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-08-27 09:13:16 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-08-27 09:16:46 (GMT) |
commit | bdcfcc607c1a6744cf1b35eca0914fa96e70071c (patch) | |
tree | cb3422a1affb5acb3042fd075fb5ceef219c9941 /src/gui/painting/qpainter.cpp | |
parent | 000b1e7aeea80655d7293b511be5e135e26aff03 (diff) | |
download | Qt-bdcfcc607c1a6744cf1b35eca0914fa96e70071c.zip Qt-bdcfcc607c1a6744cf1b35eca0914fa96e70071c.tar.gz Qt-bdcfcc607c1a6744cf1b35eca0914fa96e70071c.tar.bz2 |
Apparently QPen::brush() can't return a NoBrush for a NoPen.
There are explicit tests in qdatastream for this. IMO it's wrong,
wrong, wrong, but it's currently abused in the SVG module so we can't
change it.
Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index be90006..ee590a4 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -696,9 +696,9 @@ void QPainterPrivate::updateEmulationSpecifier(QPainterState *s) skip = false; - QBrush penBrush = s->pen.brush(); - Qt::BrushStyle brushStyle = s->brush.style(); - Qt::BrushStyle penBrushStyle = penBrush.style(); + QBrush penBrush = (qpen_style(s->pen) == Qt::NoPen) ? QBrush(Qt::NoBrush) : qpen_brush(s->pen); + Qt::BrushStyle brushStyle = qbrush_style(s->brush); + Qt::BrushStyle penBrushStyle = qbrush_style(penBrush); alpha = (penBrushStyle != Qt::NoBrush && (penBrushStyle < Qt::LinearGradientPattern && penBrush.color().alpha() != 255) && !penBrush.isOpaque()) @@ -5907,7 +5907,7 @@ void QPainter::drawStaticText(const QPointF &topLeftPosition, const QStaticText // Recreate the layout of the static text because the matrix or font has changed if (staticTextNeedsReinit) - staticText_d->init(); + staticText_d->init(); if (transformedPosition != staticText_d->position) { // Translate to actual position QFixed fx = QFixed::fromReal(transformedPosition.x()); |