Use QImage.bits instead of QImage.constBits to ease backporting

Image.constBits was introduced in Qt 4.7.  Should be ok here to use
QImage.bits which allows linking against the Qt in Squeeze.
This commit is contained in:
Petter Reinholdtsen 2013-02-09 19:18:53 +01:00 committed by Wladimir J. van der Laan
parent f50706796b
commit 17121ec4fe
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ FreedesktopImage::FreedesktopImage(const QImage &img):
{
// Convert 00xAARRGGBB to RGBA bytewise (endian-independent) format
QImage tmp = img.convertToFormat(QImage::Format_ARGB32);
const uint32_t *data = reinterpret_cast<const uint32_t*>(tmp.constBits());
const uint32_t *data = reinterpret_cast<const uint32_t*>(tmp.bits());
unsigned int num_pixels = width * height;
image.resize(num_pixels * BYTES_PER_PIXEL);