update to the newest Qt

First it crashes with the newest Qt due to nan values in graphs.
Second it produces several warnings
This commit is contained in:
2016-03-13 22:20:22 +03:00
parent 7ff1515c94
commit 7f665fef77
2 changed files with 15 additions and 12 deletions

View File

@ -21,7 +21,7 @@
#include <QGraphicsEllipseItem>
#include <QGraphicsScene>
#include <math.h>
#include <cmath>
#include "awdebug.h"
@ -150,6 +150,9 @@ float GraphicalItemHelper::getPercents(const float &value, const float &min,
const float &max)
{
qCDebug(LOG_LIB) << "Get percent value from" << value;
// newest Qt crashes here if value is nan
if (isnan(value))
return 0.0;
return (value - min) / (max - min);
}