aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-04-19 10:48:49 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-04-19 13:39:00 +0000
commitd142b2d212ea09a7919a0a2761ee9c04d5c9bda8 (patch)
tree0f741f3ed5bf39911fcc1c12a41abff2feb95974 /src
parent9bb640625d1e929f8caac34fa0a0fedeef8687ca (diff)
Fix assertion in qt_create_image_data()
Fix rounding of width and height parameters. Change-Id: Ib7655dafe382684340c32e2d2dc8adb445af65b0 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src')
-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 56578b5f16..734cadf49a 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -938,7 +938,7 @@ static QV4::ReturnedValue qt_create_image_data(qreal w, qreal h, QV4::ExecutionE
pixelData->d()->image = QImage(w, h, QImage::Format_ARGB32);
pixelData->d()->image.fill(0x00000000);
} else {
- Q_ASSERT(image.width() == int(w) && image.height() == int(h));
+ Q_ASSERT(image.width() == qRound(w) && image.height() == qRound(h));
pixelData->d()->image = image.format() == QImage::Format_ARGB32 ? image : image.convertToFormat(QImage::Format_ARGB32);
}