summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-23 10:32:42 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-23 10:32:42 (GMT)
commite1eceedaa635d0180eb798b00c3da93156d7af63 (patch)
tree04325155309fd225d68a4cf118be34c2378cb26a /src/gui/painting/qpainter.cpp
parent2c96aeb45320ade7e2c074433560185f16631374 (diff)
parent71be46c61c582d2f4635a1e420e44d57ddb5857a (diff)
downloadQt-e1eceedaa635d0180eb798b00c3da93156d7af63.zip
Qt-e1eceedaa635d0180eb798b00c3da93156d7af63.tar.gz
Qt-e1eceedaa635d0180eb798b00c3da93156d7af63.tar.bz2
Merge commit 'origin/4.5'
Conflicts: src/sql/drivers/psql/qsql_psql.cpp
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r--src/gui/painting/qpainter.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 6953e04..34305c2 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -2545,6 +2545,9 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op)
Q_D(QPainter);
if (d->extended) {
+ if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ op = Qt::ReplaceClip;
+
if (!d->engine) {
qWarning("QPainter::setClipRect: Painter not active");
return;
@@ -2598,6 +2601,9 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
return;
}
+ if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ op = Qt::ReplaceClip;
+
if (d->extended) {
d->state->clipEnabled = true;
d->extended->clip(rect, op);
@@ -2606,9 +2612,6 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
- op = Qt::ReplaceClip;
-
d->state->clipRegion = rect;
d->state->clipOperation = op;
if (op == Qt::NoClip || op == Qt::ReplaceClip)
@@ -2651,6 +2654,9 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
return;
}
+ if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ op = Qt::ReplaceClip;
+
if (d->extended) {
d->state->clipEnabled = true;
d->extended->clip(r, op);
@@ -2659,9 +2665,6 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
return;
}
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
- op = Qt::ReplaceClip;
-
d->state->clipRegion = r;
d->state->clipOperation = op;
if (op == Qt::NoClip || op == Qt::ReplaceClip)
@@ -3048,6 +3051,9 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
return;
}
+ if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
+ op = Qt::ReplaceClip;
+
if (d->extended) {
d->state->clipEnabled = true;
d->extended->clip(path, op);
@@ -3056,11 +3062,6 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
return;
}
-
-
- if (!hasClipping() && (op == Qt::IntersectClip || op == Qt::UniteClip))
- op = Qt::ReplaceClip;
-
d->state->clipPath = path;
d->state->clipOperation = op;
if (op == Qt::NoClip || op == Qt::ReplaceClip)