diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-08-26 13:46:03 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-08-26 15:03:29 (GMT) |
commit | 92a6e159518cb8c54aa9ad45cd0c70a1c6a8b50c (patch) | |
tree | 6522a72435ad8a00f9365514e6fc6673e837f21a /src/gui | |
parent | 24fb24c4b02da8380fcb7660d009d62805c0bee9 (diff) | |
download | Qt-92a6e159518cb8c54aa9ad45cd0c70a1c6a8b50c.zip Qt-92a6e159518cb8c54aa9ad45cd0c70a1c6a8b50c.tar.gz Qt-92a6e159518cb8c54aa9ad45cd0c70a1c6a8b50c.tar.bz2 |
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
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpen.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |