package: wicd-kde
severity: serious
tags: patch
wicd-kde FTBFS on armel and armhf with the following error
/build/buildd-wicd-kde_0.3.0-1-armel-LmYmpy/wicd-kde-0.3.0/applet/networkplotter.cpp:
In member function 'void NetworkPlotter::dataUpdated(const QString&, const
Data&)':
/build/buildd-wicd-kde_0.3.0-1-armel-LmYmpy/wicd-kde-0.3.0/applet/networkplotter.cpp:92:62:
error: no matching function for call to 'qMax(qreal, double)'
/build/buildd-wicd-kde_0.3.0-1-armel-LmYmpy/wicd-kde-0.3.0/applet/networkplotter.cpp:92:62:
note: candidate is:
/usr/include/qt4/QtCore/qglobal.h:1116:17: note: template<class T> const T& qMax(const
T&, const T&)
On most architectures qreal is equivilent to double but on arm
architectures qreal is equivilent to float. Because qMax is a template
both of it's parameters must be the same type.
The attatched patch solves the build failure by removing a typecast so
qMax is called with two parameters of type double. Just fill in the bug
number and add it to the quilt series.
Description: fix qreal vs double in qMax
qMax is a template that must be called with two parameters of the same
type. On most architectures qreal and double are the same type but on
arm architectures qreal is equivilent to float. So attempting to call
qMax with one argument of type double and one of type qreal fails on
arm architectures.
This patch removes a typecast so qMax is called with two arguments of
Type double.
Author: Peter Green <plugw...@p10link.net>
Bug-debian: http://bugs.debian.org/????????
--- wicd-kde-0.3.0.orig/applet/networkplotter.cpp
+++ wicd-kde-0.3.0/applet/networkplotter.cpp
@@ -89,7 +89,7 @@ void NetworkPlotter::dataUpdated(const Q
//are we getting received or transmitted data?
int index = (split[3] == "receiver") ? 0 : 1;
//fill m_data accordingly
- m_data[index] = qMax(qreal(0.0), data["value"].toDouble());
+ m_data[index] = qMax(0.0, data["value"].toDouble());
//update plotter only when the 2 values are filled
if (!m_data.contains(-1)) {
addSample(m_data);