From 00556b20067c3a4adf6ff33a17d2a4232fdce6ee Mon Sep 17 00:00:00 2001
From: Mitch Curtis <mitch.curtis@digia.com>
Date: Wed, 8 May 2013 09:55:16 +0200
Subject: [PATCH] Fix assertion in qt_create_image_data().
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Don't compare qreal against int.

Change-Id: Ic8970ed0a21a7d5d0f0ffd0ca37ee49b04f38d6c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
---
 src/quick/items/context2d/qquickcontext2d.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 4a1765f129..5709d58d58 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -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();
-- 
GitLab