summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpainter.cpp8
-rw-r--r--src/gui/painting/qpen.cpp2
2 files changed, 4 insertions, 6 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());
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index 5e158a4..2e43984 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -747,8 +747,6 @@ void QPen::setColor(const QColor &c)
*/
QBrush QPen::brush() const
{
- if (d->style == Qt::NoPen)
- return Qt::NoBrush;
return d->brush;
}