rev 20992 - in kde-extras/kmymoney2/trunk/debian: . patches
Pino Toscano
pino at moszumanska.debian.org
Sun Jan 14 19:24:17 UTC 2018
Author: pino
Date: 2018-01-14 19:24:17 +0000 (Sun, 14 Jan 2018)
New Revision: 20992
Added:
kde-extras/kmymoney2/trunk/debian/patches/
kde-extras/kmymoney2/trunk/debian/patches/qreal.diff
kde-extras/kmymoney2/trunk/debian/patches/series
Modified:
kde-extras/kmymoney2/trunk/debian/changelog
Log:
fix build where qreal==float (#887235)
Modified: kde-extras/kmymoney2/trunk/debian/changelog
===================================================================
--- kde-extras/kmymoney2/trunk/debian/changelog 2018-01-14 19:20:30 UTC (rev 20991)
+++ kde-extras/kmymoney2/trunk/debian/changelog 2018-01-14 19:24:17 UTC (rev 20992)
@@ -1,5 +1,7 @@
kmymoney (4.8.1.1-2) UNRELEASED; urgency=medium
+ [ Pino Toscano ]
+ * Fix double vs float qreal issue; patch qreal.diff. (Closes: #887235)
-- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org> Sun, 14 Jan 2018 20:20:09 +0100
Added: kde-extras/kmymoney2/trunk/debian/patches/qreal.diff
===================================================================
--- kde-extras/kmymoney2/trunk/debian/patches/qreal.diff (rev 0)
+++ kde-extras/kmymoney2/trunk/debian/patches/qreal.diff 2018-01-14 19:24:17 UTC (rev 20992)
@@ -0,0 +1,89 @@
+Author: Pino Toscano <pino at debian.org>
+Description: Fix double vs float qreal issues
+Forwarded: no
+Last-Update: 2018-01-14
+
+--- a/libkdchart/src/KDChart/Cartesian/KDChartCartesianAxis.cpp
++++ b/libkdchart/src/KDChart/Cartesian/KDChartCartesianAxis.cpp
+@@ -1012,8 +1012,8 @@ QSize CartesianAxis::Private::calculateM
+ qreal labelMargin = 0.0;
+ QString text = it.text();
+ if ( !text.isEmpty() ) {
+- QPointF labelPosition = plane->translate( QPointF( geoXy( drawPos, 1.0 ),
+- geoXy( 1.0, drawPos ) ) );
++ QPointF labelPosition = plane->translate( QPointF( geoXy( drawPos, qreal(1.0) ),
++ geoXy( qreal(1.0), drawPos ) ) );
+ highestLabelPosition = geoXy( labelPosition.x(), labelPosition.y() );
+
+ if ( it.type() == TickIterator::MajorTick ) {
+@@ -1059,10 +1059,10 @@ QSize CartesianAxis::Private::calculateM
+ highestLabelLongitudinalSize * 0.5 );
+ }
+
+- amountOfLeftOverlap = geoXy( startOverhang, 0.0 );
+- amountOfRightOverlap = geoXy( endOverhang, 0.0 );
+- amountOfBottomOverlap = geoXy( 0.0, startOverhang );
+- amountOfTopOverlap = geoXy( 0.0, endOverhang );
++ amountOfLeftOverlap = geoXy( startOverhang, qreal(0.0) );
++ amountOfRightOverlap = geoXy( endOverhang, qreal(0.0) );
++ amountOfBottomOverlap = geoXy( qreal(0.0), startOverhang );
++ amountOfTopOverlap = geoXy( qreal(0.0), endOverhang );
+
+ const TextAttributes titleTA = titleTextAttributesWithAdjustedRotation();
+ if ( titleTA.isVisible() && !axis()->titleText().isEmpty() ) {
+--- a/libkdchart/src/KDChart/Polar/KDChartPieDiagram.cpp
++++ b/libkdchart/src/KDChart/Polar/KDChartPieDiagram.cpp
+@@ -283,7 +283,7 @@ void PieDiagram::placeLabels( PaintConte
+ if ( maxOverhang > 0.0 ) {
+ // subtract 2x as much because every side only gets half of the total diameter reduction
+ // and we have to make up for the overhang on one particular side.
+- d->size -= qMin( d->size, maxOverhang * 2.0 );
++ d->size -= qMin<qreal>( d->size, maxOverhang * 2.0 );
+ tryAgain = true;
+ }
+ }
+--- a/libkdchart/src/KDChart/Polar/KDChartRingDiagram.cpp
++++ b/libkdchart/src/KDChart/Polar/KDChartRingDiagram.cpp
+@@ -189,7 +189,7 @@ void RingDiagram::paint( PaintContext* c
+ if ( !d->expandWhenExploded ) {
+ maxOffsetInThisRow -= qreal( i );
+ }
+- totalOffset += qMax( maxOffsetInThisRow, 0.0 );
++ totalOffset += qMax( maxOffsetInThisRow, qreal(0.0) );
+ // FIXME: What if explode factor of inner ring is > 1.0 ?
+ //if ( !d->expandWhenExploded )
+ // break;
+--- a/libkdchart/src/KDChart/Ternary/KDChartTernaryPointDiagram.cpp
++++ b/libkdchart/src/KDChart/Ternary/KDChartTernaryPointDiagram.cpp
+@@ -102,11 +102,11 @@ void TernaryPointDiagram::paint (PaintC
+
+ // retrieve data
+ x = qMax( model()->data( model()->index( row, column+0, rootIndex() ) ).toReal(), // checked
+- 0.0 );
++ qreal(0.0) );
+ y = qMax( model()->data( model()->index( row, column+1, rootIndex() ) ).toReal(), // checked
+- 0.0 );
++ qreal(0.0) );
+ z = qMax( model()->data( model()->index( row, column+2, rootIndex() ) ).toReal(), // checked
+- 0.0 );
++ qreal(0.0) );
+
+ // fix messed up data values (paint as much as possible)
+ qreal total = x + y + z;
+--- a/libkdchart/src/KDChart/Ternary/KDChartTernaryLineDiagram.cpp
++++ b/libkdchart/src/KDChart/Ternary/KDChartTernaryLineDiagram.cpp
+@@ -114,11 +114,11 @@ void TernaryLineDiagram::paint (PaintCo
+
+ // retrieve data
+ x = qMax( model()->data( model()->index( row, column, rootIndex() ) ).toReal(), // checked
+- 0.0 );
++ qreal(0.0) );
+ y = qMax( model()->data( model()->index( row, column+1, rootIndex() ) ).toReal(), // checked
+- 0.0 );
++ qreal(0.0) );
+ z = qMax( model()->data( model()->index( row, column+2, rootIndex() ) ).toReal(), // checked
+- 0.0 );
++ qreal(0.0) );
+
+ qreal total = x + y + z;
+ if ( fabs( total ) > 3 * std::numeric_limits<qreal>::epsilon() ) {
Added: kde-extras/kmymoney2/trunk/debian/patches/series
===================================================================
--- kde-extras/kmymoney2/trunk/debian/patches/series (rev 0)
+++ kde-extras/kmymoney2/trunk/debian/patches/series 2018-01-14 19:24:17 UTC (rev 20992)
@@ -0,0 +1 @@
+qreal.diff
More information about the pkg-kde-commits
mailing list