summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKavindra Devi Palaraja <kavindra.palaraja@nokia.com>2009-04-15 13:08:44 (GMT)
committerKavindra Devi Palaraja <kavindra.palaraja@nokia.com>2009-04-15 13:08:44 (GMT)
commitba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8 (patch)
treeeb848ccab795ec4514a0fa579ec6932bb1209e13
parent96a529868cc75523f03aae5eb9ffdf72e29aab96 (diff)
parent9da65ead69c92df717b1a63fe3c98c0cc73270f9 (diff)
downloadQt-ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8.zip
Qt-ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8.tar.gz
Qt-ba6ad129f2dc9d7dd5cbd511c3fe515908f5f6a8.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
-rw-r--r--dist/changes-4.5.14
-rw-r--r--src/gui/painting/qwindowsurface.cpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/dist/changes-4.5.1 b/dist/changes-4.5.1
index 4fb155a..bda151f 100644
--- a/dist/changes-4.5.1
+++ b/dist/changes-4.5.1
@@ -162,6 +162,10 @@ Third party components
sorting is disabled
* [248163] Fixed possible crash in the paintEvent when spans are used.
+- QWidget
+ * [250388] Fixed potential crash in QWidget::scroll() when using the raster
+ graphics system.
+
- QWizard
* [248107] Fixed bug on Vista causing Back button to connect twice to the back() signal.
diff --git a/src/gui/painting/qwindowsurface.cpp b/src/gui/painting/qwindowsurface.cpp
index bcb0380..d941a24 100644
--- a/src/gui/painting/qwindowsurface.cpp
+++ b/src/gui/painting/qwindowsurface.cpp
@@ -310,10 +310,13 @@ void qt_scrollRectInImage(QImage &img, const QRect &rect, const QPoint &offset)
int lineskip = img.bytesPerLine();
int depth = img.depth() >> 3;
-
- const QRect r = rect & QRect(0, 0, img.width(), img.height());
+ const QRect imageRect(0, 0, img.width(), img.height());
+ const QRect r = rect & imageRect & imageRect.translated(-offset);
const QPoint p = rect.topLeft() + offset;
+ if (r.isEmpty())
+ return;
+
const uchar *src;
uchar *dest;