[MassifVisualizer] [Bug 308357] New: Fails to build on arm due to qreal/double mismatch in embedded kdchart

Scott Kitterman kde at kitterman.com
Sun Oct 14 06:13:59 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=308357

            Bug ID: 308357
          Severity: major
           Version: 0.3
          Priority: NOR
          Assignee: massif-visualizer at kde.org
           Summary: Fails to build on arm due to qreal/double mismatch in
                    embedded kdchart
    Classification: Unclassified
                OS: Linux
          Reporter: kde at kitterman.com
          Hardware: Other
            Status: UNCONFIRMED
         Component: general
           Product: massif-visualizer

qreal != double on arm architectures, so code that assume it is won't build:

/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartAbstractDiagram_p.h: In
member function 'void
KDChart::AbstractDiagram::Private::paintDataValueText(const
KDChart::AbstractDiagram*, QPainter*, const KDChart::DataValueAttributes&,
const QPointF&, QString, bool, bool, QRectF*)':
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartAbstractDiagram_p.h:305:37:
warning: variable 'alignBottomLeft' set but not used
[-Wunused-but-set-variable]
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp: In
member function 'virtual const QPair<QPointF, QPointF>
KDChart::StackedPlotter::calculateDataBoundaries() const':
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:86:43:
error: no matching function for call to 'qMin(double&, const qreal&)'
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:86:43:
note: candidate is:
In file included from /usr/include/qt4/QtCore/qnamespace.h:45:0,
                 from /usr/include/qt4/QtCore/qobjectdefs.h:45,
                 from /usr/include/qt4/QtCore/qobject.h:47,
                 from /usr/include/qt4/QtCore/QObject:1,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartAbstractCoordinatePlane.h:27,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartCartesianCoordinatePlane.h:27,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartAbstractCartesianDiagram.h:27,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartPlotter.h:31,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartPlotter_p.h:38,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.h:31,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:28:
/usr/include/qt4/QtCore/qglobal.h:1213:34: note: template<class T> const T&
qMin(const T&, const T&)
/usr/include/qt4/QtCore/qglobal.h:1213:34: note:   template argument
deduction/substitution failed:
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:86:43:
note:   deduced conflicting types for parameter 'const T' ('double' and 'qreal
{aka float}')
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:87:43:
error: no matching function for call to 'qMax(double&, const qreal&)'
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:87:43:
note: candidate is:
In file included from /usr/include/qt4/QtCore/qnamespace.h:45:0,
                 from /usr/include/qt4/QtCore/qobjectdefs.h:45,
                 from /usr/include/qt4/QtCore/qobject.h:47,
                 from /usr/include/qt4/QtCore/QObject:1,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartAbstractCoordinatePlane.h:27,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartCartesianCoordinatePlane.h:27,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartAbstractCartesianDiagram.h:27,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartPlotter.h:31,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartPlotter_p.h:38,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.h:31,
                 from
/build/buildd/massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp:28:
Here's the fix:

Index: massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp
===================================================================
--- massif-visualizer-0.3.orig/kdchart/src/KDChartStackedPlotter_p.cpp 
2011-11-06 17:45:56.000000000 -0500
+++ massif-visualizer-0.3/kdchart/src/KDChartStackedPlotter_p.cpp      
2012-10-14 02:06:56.383367363 -0400
@@ -83,8 +83,8 @@
             // take in account all stacked values
             yMin = qMin( qMin( yMin, negativeStackedValues ), stackedValues );
             yMax = qMax( qMax( yMax, negativeStackedValues ), stackedValues );
-            xMin = qMin( xMin, xPoint.key );
-            xMax = qMax( xMax, xPoint.key );
+            xMin = qMin( qreal(xMin), xPoint.key );
+            xMax = qMax( qreal(xMax), xPoint.key );
         }
     }


Reproducible: Always

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Massif-visualizer mailing list