File Support-non-integer-scale-factors-in-kiconengine.patch of Package kiconthemes.openSUSE_Leap_42.2_Update

From c203e366c400bab750e0b0f3d640f7fa85c35065 Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Mon, 24 Oct 2016 16:04:54 +0100
Subject: Support non integer scale factors in kiconengine

REVIEW: 129253
CCBUG: 366451
---
 src/kiconengine.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/kiconengine.cpp b/src/kiconengine.cpp
index c31829e..6f3288c 100644
--- a/src/kiconengine.cpp
+++ b/src/kiconengine.cpp
@@ -74,7 +74,11 @@ void KIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode mode,
 
     Q_UNUSED(state)
 
-    qreal dpr = painter->device()->devicePixelRatio();
+#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
+    const qreal dpr = painter->device()->devicePixelRatioF();
+#else
+    const qreal dpr = painter->device()->devicePixelRatio();
+#endif
 
     const int kstate = qIconModeToKIconState(mode);
     const int iconSize = qMin(rect.width(), rect.height()) * dpr;
-- 
cgit v0.11.2

openSUSE Build Service is sponsored by