Fix assertion in qt_create_image_data().
authorMitch Curtis <mitch.curtis@digia.com>
Wed, 8 May 2013 07:55:16 +0000 (09:55 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 10 May 2013 08:17:20 +0000 (10:17 +0200)
Don't compare qreal against int.

Change-Id: Ic8970ed0a21a7d5d0f0ffd0ca37ee49b04f38d6c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>

src/quick/items/context2d/qquickcontext2d.cpp

index 4a1765f..5709d58 100644 (file)
@@ -467,7 +467,7 @@ static v8::Local<v8::Object> qt_create_image_data(qreal w, qreal h, QV8Engine* e
         r->image = QImage(w, h, QImage::Format_ARGB32);
         r->image.fill(0x00000000);
     } else {
-        Q_ASSERT(image.width() == w && image.height() == h);
+        Q_ASSERT(image.width() == int(w) && image.height() == int(h));
         r->image = image.format() == QImage::Format_ARGB32 ? image : image.convertToFormat(QImage::Format_ARGB32);
     }
     v8::Local<v8::Object> pixelData = ed->constructorPixelArray->NewInstance();