summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-10-15 17:06:34 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-22 19:36:43 +0200
commitb213d5bfa3a8ed81077cd8eaf229764ff2f1b346 (patch)
treec38b11225116886274631306e6018ffd23cdc2af /tests/auto/gui
parent11566de014ed22051a53f1f0c94697fd18a87500 (diff)
Make QPen default to 1-width non-cosmetic.
Use the Qt4CompatiblePainting render hint when painting with QPainter to treat default constructed QPens as cosmetic still. The NonCosmeticDefaultPen render hint gets documented as obsolete, since it was in any case not respected by the raster nor OpenGL paint engine. Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/painting/qpainter/tst_qpainter.cpp1
-rw-r--r--tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp4
-rw-r--r--tests/auto/gui/painting/qpen/tst_qpen.cpp4
3 files changed, 5 insertions, 4 deletions
diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
index 24be319173..09180b3de9 100644
--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
@@ -1490,6 +1490,7 @@ void tst_QPainter::setWindow()
pixmap.fill(QColor(Qt::white));
QPainter painter(&pixmap);
+ painter.setRenderHint(QPainter::Qt4CompatiblePainting);
painter.setWindow(0, 0, 3, 3);
painter.drawLine(1, 1, 2, 2);
diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
index 2ccc6c4ad3..4172076f6a 100644
--- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
@@ -470,9 +470,9 @@ void tst_QPathClipper::clipTest(int subjectIndex, int clipIndex, QPathClipper::O
p.setRenderHint(QPainter::Antialiasing);
p.scale(scale, scale);
p.translate(-bounds.topLeft());
- p.setPen(Qt::black);
+ p.setPen(QPen(Qt::black, 0));
p.drawPath(subject);
- p.setPen(Qt::red);
+ p.setPen(QPen(Qt::red, 0));
p.drawPath(clip);
p.end();
diff --git a/tests/auto/gui/painting/qpen/tst_qpen.cpp b/tests/auto/gui/painting/qpen/tst_qpen.cpp
index 35a71ba0a9..1ef7a4d0c4 100644
--- a/tests/auto/gui/painting/qpen/tst_qpen.cpp
+++ b/tests/auto/gui/painting/qpen/tst_qpen.cpp
@@ -154,9 +154,9 @@ void tst_QPen::constructor_data()
QTest::addColumn<int>("capStyle");
QTest::addColumn<int>("joinStyle");
- QTest::newRow("solid_black") << QPen() << QBrush(Qt::black) << 0. << (int)Qt::SolidLine
+ QTest::newRow("solid_black") << QPen() << QBrush(Qt::black) << 1. << (int)Qt::SolidLine
<< (int) Qt::SquareCap << (int)Qt::BevelJoin;
- QTest::newRow("solid_red") << QPen(Qt::red) << QBrush(Qt::red) << 0. << (int)Qt::SolidLine
+ QTest::newRow("solid_red") << QPen(Qt::red) << QBrush(Qt::red) << 1. << (int)Qt::SolidLine
<< (int)Qt::SquareCap << (int)Qt::BevelJoin;
QTest::newRow("full") << QPen(QBrush(QLinearGradient(0, 0, 100, 100)), 10,
Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin)