aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@digia.com>2013-05-08 09:55:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-10 10:17:20 +0200
commit00556b20067c3a4adf6ff33a17d2a4232fdce6ee (patch)
tree0697ca3c57d801113bc9e6a14affe2ca207219b6 /src/quick
parenta3837c357ee5dd9a5a8b2bdcc17b4ce427dc5982 (diff)
Fix assertion in qt_create_image_data().
Don't compare qreal against int. Change-Id: Ic8970ed0a21a7d5d0f0ffd0ca37ee49b04f38d6c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp2
1 files changed, 1 insertions, 1 deletions
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();