mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-17 07:39:58 +00:00
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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user