[SCM] qtstyleplugins packaging branch, master, updated. 675f058938cc04a4e64bf6565699be9c4cd4781c

Pino Toscano pino at moszumanska.debian.org
Mon Dec 29 13:33:52 UTC 2014


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtstyleplugins.git;a=commitdiff;h=675f058

The following commit has been merged in the master branch:
commit 675f058938cc04a4e64bf6565699be9c4cd4781c
Author: Pino Toscano <pino at debian.org>
Date:   Mon Dec 29 14:33:20 2014 +0100

    fix floating point exception in Cleanlooks style
    
    backport upstream commit 8ff2ac6035fb1d01f5c0054ba14afb949410e3a7
---
 debian/changelog                                   |  3 ++
 debian/patches/series                              |  1 +
 ...nlooks-style-Fix-floating-point-exception.patch | 38 ++++++++++++++++++++++
 3 files changed, 42 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 511565b..7c0f832 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,5 +2,8 @@ qtstyleplugins-src (5.0.0-0r1) UNRELEASED; urgency=low
 
   [ Pino Toscano ]
   * Initial release.
+  * Backport upstream commit 8ff2ac6035fb1d01f5c0054ba14afb949410e3a7 to fix
+    a floating point exception in Cleanlooks style; patch
+    upstream_Cleanlooks-style-Fix-floating-point-exception.patch.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Mon, 29 Dec 2014 13:25:45 +0100
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..768a188
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream_Cleanlooks-style-Fix-floating-point-exception.patch
diff --git a/debian/patches/upstream_Cleanlooks-style-Fix-floating-point-exception.patch b/debian/patches/upstream_Cleanlooks-style-Fix-floating-point-exception.patch
new file mode 100644
index 0000000..0363235
--- /dev/null
+++ b/debian/patches/upstream_Cleanlooks-style-Fix-floating-point-exception.patch
@@ -0,0 +1,38 @@
+From 8ff2ac6035fb1d01f5c0054ba14afb949410e3a7 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino at gentoo.org>
+Date: Wed, 4 Jun 2014 20:27:53 -0400
+Subject: [PATCH] Cleanlooks style: Fix floating point exception
+
+In QCleanlooksStyle::drawControl, if indeterminate == true and
+rect.width() == 4, we will end up with slideWidth of zero, and
+take a mod by zero when calculating the value of step.
+
+Identical code in Qt4 Cleanlooks causes a crash in Quassel 0.10;
+see https://bugs.gentoo.org/show_bug.cgi?id=507124
+
+Instead, calculate slideWidth based on max(width, minWidth) where
+minWidth was already set as 4, ensuring that slideWidth >= 2.
+
+Change-Id: Id3e39437665be326358f68c48eaf1249b6880c4a
+Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo at kdab.com>
+Reviewed-by: J-P Nurmi <jpnurmi at digia.com>
+---
+ src/plugins/styles/cleanlooks/qcleanlooksstyle.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/plugins/styles/cleanlooks/qcleanlooksstyle.cpp b/src/plugins/styles/cleanlooks/qcleanlooksstyle.cpp
+index 8d89e39..1e82ed7 100644
+--- a/src/plugins/styles/cleanlooks/qcleanlooksstyle.cpp
++++ b/src/plugins/styles/cleanlooks/qcleanlooksstyle.cpp
+@@ -1749,7 +1749,7 @@ void QCleanlooksStyle::drawControl(ControlElement element, const QStyleOption *o
+                     progressBar.setRect(rect.right() - 1 - width, rect.top() + 1, width + 1, rect.height() - 3);
+                 }
+             } else {
+-                int slideWidth = ((rect.width() - 4) * 2) / 3;
++                int slideWidth = (qMax(rect.width() - 4, minWidth) * 2) / 3;
+                 int step = ((animateStep * slideWidth) / progressAnimationFps) % slideWidth;
+                 if ((((animateStep * slideWidth) / progressAnimationFps) % (2 * slideWidth)) >= slideWidth)
+                     step = slideWidth - step;
+-- 
+2.1.4
+

-- 
qtstyleplugins packaging



More information about the pkg-kde-commits mailing list