aboutsummarylogtreecommitdiffstats
path: root/0001-Fix-build-with-qreal-as-float.patch
blob: d3f460afec5054bab5deb204389f28b4b553fa92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 7dbbe0deb80beb7c1d6539a1f1856803fcbf8957 Mon Sep 17 00:00:00 2001
From: Donald Carr <d@chaos-reins.com>
Date: Mon, 22 May 2017 15:49:11 -0700
Subject: [PATCH] Fix build with qreal as float

Change-Id: I324c3805c953371c659903d7c4115caf7266b4ea
---
 src/plugins/scenegraph/openvg/qsgopenvghelpers.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/plugins/scenegraph/openvg/qsgopenvghelpers.cpp b/src/plugins/scenegraph/openvg/qsgopenvghelpers.cpp
index 6bc99d32a..ab5cfb48b 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvghelpers.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvghelpers.cpp
@@ -220,10 +220,10 @@ void qDrawTiled(VGImage image, const QSize imageSize, const QRectF &targetRect,
 void qDrawBorderImage(VGImage image, const QSizeF &textureSize, const QRectF &targetRect, const QRectF &innerTargetRect, const QRectF &subSourceRect)
 {
     // Create normalized margins
-    QMarginsF margins(qMax(innerTargetRect.left() - targetRect.left(), 0.0),
-                      qMax(innerTargetRect.top() - targetRect.top(), 0.0),
-                      qMax(targetRect.right() - innerTargetRect.right(), 0.0),
-                      qMax(targetRect.bottom() - innerTargetRect.bottom(), 0.0));
+    QMarginsF margins(qMax(innerTargetRect.left() - targetRect.left(), qreal(0.0)),
+                      qMax(innerTargetRect.top() - targetRect.top(), qreal(0.0)),
+                      qMax(targetRect.right() - innerTargetRect.right(), qreal(0.0)),
+                      qMax(targetRect.bottom() - innerTargetRect.bottom(), qreal(0.0)));
 
     QRectF sourceRect(0, 0, textureSize.width(), textureSize.height());
 
-- 
2.13.0