From 92a6e159518cb8c54aa9ad45cd0c70a1c6a8b50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 26 Aug 2010 15:46:03 +0200 Subject: Calling QPen::brush() on a Qt::NoPen pen, should return QBrush::NoBrush. This could cause some strange things to happen in our fallback code used for e.g. printing, since the brush might be valid and e.g. contain alpha values etc. Task-number: QTBUG-12263 Reviewed-by: Gunnar --- src/gui/painting/qpen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp index 2e43984..5e158a4 100644 --- a/src/gui/painting/qpen.cpp +++ b/src/gui/painting/qpen.cpp @@ -747,6 +747,8 @@ void QPen::setColor(const QColor &c) */ QBrush QPen::brush() const { + if (d->style == Qt::NoPen) + return Qt::NoBrush; return d->brush; } -- cgit v0.12