diff options
author | aavit <eirik.aavitsland@digia.com> | 2012-10-23 15:27:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-25 14:10:04 +0200 |
commit | 52ccbd8911f1b96b8bea6a4c9da4d4a762dee2a7 (patch) | |
tree | 87120fb7841570297e85d4e73255cafd04310148 /tests/auto | |
parent | de58eb64bc564fcb8af61a45576783e432d2380c (diff) |
Fix: don't override the new non-cosmetic default pen in qwidget
As QWidget initializes any painter created in paintevent handler to
have the pen color of the palette's foreground, setting it to 0 width,
i.e. cosmetic, it negated the effect of the recent change to default
1-width non-cosmetic, ref. I04d910e9700baf7f13a8aac07a3633014bb9283e
This caused scaled painting with default pen on QImage and QWidget
to yield different results.
Change-Id: I930b64bf7c0a8c84b9ea3edb49adc813370fed0e
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp index 57b7d08ab0..80de2da975 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp @@ -2508,8 +2508,8 @@ public: void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) { - dirtyPainter = (painter->pen().width() != 0); - painter->setPen(QPen(Qt::black, 1.0)); + dirtyPainter = (painter->pen().color() != Qt::black); + painter->setPen(Qt::red); } }; |