From ba7a4db93485a84fb2b244d4216d58fcd5a76301 Mon Sep 17 00:00:00 2001 From: Phenom Date: Tue, 12 May 2020 19:56:11 +0200 Subject: [PATCH] Fix RSElidedItemDelegate abs to use std one. --- retroshare-gui/src/gui/common/RSElidedItemDelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/common/RSElidedItemDelegate.cpp b/retroshare-gui/src/gui/common/RSElidedItemDelegate.cpp index 0da9b3124..66ceb2072 100644 --- a/retroshare-gui/src/gui/common/RSElidedItemDelegate.cpp +++ b/retroshare-gui/src/gui/common/RSElidedItemDelegate.cpp @@ -162,7 +162,7 @@ void RSElidedItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem & int duration = 3;// Time (s) to make a revolution. auto time = (s%duration)*1000 + ms; qreal angle = 360.0*(time/(duration*1000.0)); - qreal add = 120*(time/(duration*1000.0))*abs(sin(qDegreesToRadians(angle/2))); + qreal add = 120*(time/(duration*1000.0))*std::abs(sin(qDegreesToRadians(angle/2))); painter->setPen(QPen(QBrush(ownOption.palette.color(QPalette::Normal, QPalette::WindowText)),diag/10,Qt::DotLine,Qt::RoundCap)); painter->drawEllipse( iconRect.x()+iconRect.width() /2 + (diag/4)*cos(qDegreesToRadians(angle )) , iconRect.y()+iconRect.height()/2 + (diag/4)*sin(qDegreesToRadians(angle )), 1, 1);