Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.3, 4.6.2, 4.7.1
-
None
-
Windows XP
Qt 4.5.3, 4.6.2, 4.7.x
-
c7e21f392355fddcf586815ed42279a3663bf981
Description
Location: src/gui/image/qbmphandler.cpp, function qt_write_dib, lines 592, 609 and 619
Because the argument 'QImage image' is non-const, the calls to QImage::scanLine on the aforementioned lines will cause an unnecessary detach.
Solution (as used in other image format handlers): change
image.scanLine(y)
into
static_cast<const QImage&>(image).scanLine(y)
and make pointer p declared on line 604 const.