From: Ralf Habacker Date: Thu, 28 Apr 2016 12:54:55 +0000 Subject: Fix of 'call of overloaded ‘abs(qreal)’ is ambiguous'. X-Git-Tag: v16.04.1 X-Git-Url: http://quickgit.kde.org/?p=umbrello.git&a=commitdiff&h=5a61fbc0e6218a9e40a53d4bc2f3785dcdd2eb68 --- Fix of 'call of overloaded ‘abs(qreal)’ is ambiguous'. stackoverflow.com mentiones to use fabs(). BUG:362410 FIXED-IN:2.19.2 (KDE Applications 16.04.2) --- --- a/umbrello/umlwidgets/associationwidget.cpp +++ b/umbrello/umlwidgets/associationwidget.cpp @@ -2133,9 +2133,9 @@ p1.setX(xmil + (xfin - xmil)*1/2); p1.setY(ymil + (yfin - ymil)*1/3); p2.setX(xmil - (xmil - xdeb)*1/2); p2.setY(ymil - (ymil - ydeb)*1/3); - if (abs(p1.x() - p2.x()) <= 10) + if (fabs(p1.x() - p2.x()) <= 10) ESPACEX = 15; - if (abs(p1.y() - p2.y()) <= 10) + if (fabs(p1.y() - p2.y()) <= 10) ESPACEY = 15; m_associationLine->setEndPoints(QPointF(xdeb, ydeb), QPointF(xfin, yfin)); @@ -2703,8 +2703,8 @@ r = textWidth; // swap textCenter{X,Y} to convert from Qt coord.system. const QPointF origTextCenter(textCenterY, textCenterX); - const int relX = abs(origTextCenter.x() - midP.x()); - const int relY = abs(origTextCenter.y() - midP.y()); + const int relX = fabs(origTextCenter.x() - midP.x()); + const int relY = fabs(origTextCenter.y() - midP.y()); const double negativeWhenInsideCircle = relX * relX + relY * relY - r * r; if (negativeWhenInsideCircle <= 0.0) { return;