Date: Mon, 25 Feb 2019 20:04:05 +0000 (UTC) From: "Tobias C. Berner" <tcberner@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r493895 - in head/x11-toolkits/qt5-quickcontrols: . files Message-ID: <201902252004.x1PK45S9073439@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tcberner Date: Mon Feb 25 20:04:05 2019 New Revision: 493895 URL: https://svnweb.freebsd.org/changeset/ports/493895 Log: x11-toolkits/qt5-quickcontrols: fix regression in 5.12.1 https://bugreports.qt.io/browse/QTBUG-73691 Added: head/x11-toolkits/qt5-quickcontrols/files/ head/x11-toolkits/qt5-quickcontrols/files/patch-git_c23139 (contents, props changed) Modified: head/x11-toolkits/qt5-quickcontrols/Makefile Modified: head/x11-toolkits/qt5-quickcontrols/Makefile ============================================================================== --- head/x11-toolkits/qt5-quickcontrols/Makefile Mon Feb 25 19:56:33 2019 (r493894) +++ head/x11-toolkits/qt5-quickcontrols/Makefile Mon Feb 25 20:04:05 2019 (r493895) @@ -2,6 +2,7 @@ PORTNAME= quickcontrols DISTVERSION= ${QT5_VERSION} +PORTREVISION= 1 CATEGORIES= x11-toolkits PKGNAMEPREFIX= qt5- Added: head/x11-toolkits/qt5-quickcontrols/files/patch-git_c23139 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-toolkits/qt5-quickcontrols/files/patch-git_c23139 Mon Feb 25 20:04:05 2019 (r493895) @@ -0,0 +1,32 @@ +From c231395eec3494619f4977b4c5cd845b9d7341ae Mon Sep 17 00:00:00 2001 +From: Benjamin Robin <dev@benjarobin.fr> +Date: Sun, 24 Feb 2019 10:28:14 +0100 +Subject: [PATCH] ScrollViewStyle: Avoid division by zero in extent computation + +If the flickableItem content is empty (contentWidth / contentHeight is +equal to 0), prevent the division by zero in the computation of the +extent variable. + +Task-number: QTBUG-73691 +Change-Id: I86becca9a1fa2508d1acafe09f46dfc952e4e96d +Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> +--- + src/controls/Styles/Base/ScrollViewStyle.qml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git src/controls/Styles/Base/ScrollViewStyle.qml src/controls/Styles/Base/ScrollViewStyle.qml +index 6750399d..36b518d3 100644 +--- src/controls/Styles/Base/ScrollViewStyle.qml ++++ src/controls/Styles/Base/ScrollViewStyle.qml +@@ -370,8 +370,8 @@ Style { + + property var flickableItem: control.flickableItem + property int extent: Math.max(minimumHandleLength, __styleData.horizontal ? +- Math.min(1, (flickableItem ? flickableItem.width/flickableItem.contentWidth : 1)) * bg.width : +- Math.min(1, (flickableItem ? flickableItem.height/flickableItem.contentHeight : 1)) * bg.height) ++ Math.min(1, ((flickableItem && flickableItem.contentWidth > 0.0) ? flickableItem.width/flickableItem.contentWidth : 1)) * bg.width : ++ Math.min(1, ((flickableItem && flickableItem.contentHeight > 0.0) ? flickableItem.height/flickableItem.contentHeight : 1)) * bg.height) + readonly property real range: __control.maximumValue - __control.minimumValue + readonly property real begin: __control.value - __control.minimumValue + +--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902252004.x1PK45S9073439>