summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-18 15:04:46 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-18 15:07:04 (GMT)
commitf9f08de9d41fd55d9c7d01578191ef5d4099c9e6 (patch)
treee6167fa1475a201c887f46f3b0c411f3e92d645a /src/gui/widgets
parent396eeb3f71c1c7edd861da1c8a8ec3086348502e (diff)
downloadQt-f9f08de9d41fd55d9c7d01578191ef5d4099c9e6.zip
Qt-f9f08de9d41fd55d9c7d01578191ef5d4099c9e6.tar.gz
Qt-f9f08de9d41fd55d9c7d01578191ef5d4099c9e6.tar.bz2
Use QTransform more efficiently.
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qplaintextedit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index d1978e3..efacd00 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1725,8 +1725,7 @@ static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, QRectF
p->save();
if (brush.style() >= Qt::LinearGradientPattern && brush.style() <= Qt::ConicalGradientPattern) {
if (!gradientRect.isNull()) {
- QTransform m;
- m.translate(gradientRect.left(), gradientRect.top());
+ QTransform m = QTransform::fromTranslate(gradientRect.left(), gradientRect.top());
m.scale(gradientRect.width(), gradientRect.height());
brush.setTransform(m);
const_cast<QGradient *>(brush.gradient())->setCoordinateMode(QGradient::LogicalMode);