Compile fix for QImage autotest.
authorSamuel Rødal <samuel.rodal@nokia.com>
Tue, 26 Jul 2011 09:54:15 +0000 (11:54 +0200)
committerJørgen Lind <jorgen.lind@nokia.com>
Tue, 26 Jul 2011 10:02:57 +0000 (12:02 +0200)
QImage::numBytes() is deprecated, QImage::byteCount() should be used
instead.

Change-Id: I0f885b91a49de59eb371da931bb64d2d57fcc0d0
Reviewed-on: http://codereview.qt.nokia.com/2177
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
tests/auto/qimage/tst_qimage.cpp

index 4336feb..dce2957 100644 (file)
@@ -1986,7 +1986,7 @@ void tst_QImage::rgbSwapped()
 
     QCOMPARE(image, imageSwappedTwice);
 
-    QCOMPARE(memcmp(image.constBits(), imageSwappedTwice.constBits(), image.numBytes()), 0);
+    QCOMPARE(memcmp(image.constBits(), imageSwappedTwice.constBits(), image.byteCount()), 0);
 }
 
 void tst_QImage::deepCopyWhenPaintingActive()