diff --git a/src/libs/modelinglib/qmt/diagram_scene/parts/arrowitem.cpp b/src/libs/modelinglib/qmt/diagram_scene/parts/arrowitem.cpp index 3dddd5fbb4c..afd676b0f05 100644 --- a/src/libs/modelinglib/qmt/diagram_scene/parts/arrowitem.cpp +++ b/src/libs/modelinglib/qmt/diagram_scene/parts/arrowitem.cpp @@ -454,7 +454,7 @@ void ArrowItem::updateHeadGeometry(QGraphicsItem *headItem, const QPointF &pos, QVector2D directionVector(pos - otherPos); directionVector.normalize(); - double angle = qAcos(directionVector.x()) * 180.0 / 3.1415926535; + double angle = qAcos(directionVector.x()) * 180.0 / M_PI; if (directionVector.y() > 0.0) angle = -angle; headItem->setRotation(-angle); diff --git a/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp b/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp index 2e140731a92..461897ee75d 100644 --- a/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp +++ b/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp @@ -219,7 +219,7 @@ double GeometryUtilities::calcAngle(const QLineF &line) { QVector2D directionVector(line.p2() - line.p1()); directionVector.normalize(); - double angle = qAcos(directionVector.x()) * 180.0 / 3.1415926535; + double angle = qAcos(directionVector.x()) * 180.0 / M_PI; if (directionVector.y() > 0.0) angle = -angle; return angle; diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp index 1800d562946..9891a2b3f40 100644 --- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp +++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp @@ -8,7 +8,6 @@ #include "../actionmanager/actionmanager.h" #include "../actionmanager/command.h" #include "../icontext.h" -#include "../coreconstants.h" #include "../icore.h" #include "../statusbarmanager.h" @@ -28,10 +27,9 @@ #include #include #include +#include #include -#include - static const char kSettingsGroup[] = "Progress"; static const char kDetailsPinned[] = "DetailsPinned"; static const bool kDetailsPinnedDefault = true; @@ -787,7 +785,7 @@ void ProgressTimer::handleTimeout() // future finishes. That's not bad for a random choice. const double mapped = atan2(double(m_currentTime) * TimerInterval / 1000.0, double(m_expectedTime)); - const double progress = 100 * 2 * mapped / 3.14; + const double progress = 100 * 2 * mapped / M_PI; m_futureInterface.setProgressValue(int(progress)); }