From: Mitch Curtis Date: Wed, 8 May 2013 07:55:16 +0000 (+0200) Subject: Fix assertion in qt_create_image_data(). X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=00556b20067c3a4adf6ff33a17d2a4232fdce6ee;p=konrad%2Fqtdeclarative.git Fix assertion in qt_create_image_data(). Don't compare qreal against int. Change-Id: Ic8970ed0a21a7d5d0f0ffd0ca37ee49b04f38d6c Reviewed-by: Samuel Rødal --- diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 4a1765f..5709d58 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -467,7 +467,7 @@ static v8::Local 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 pixelData = ed->constructorPixelArray->NewInstance();