From cf9fb10355b1b63de9325812ecb5351248f2723f Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Tue, 6 May 2014 02:24:35 +1000 Subject: [PATCH] Fix Qt 5.2.1 mingw build missing M_PI. But don't use Qt5.2.1 on windows. OpenGl is broken --- sleepyhead/Graphs/glcommon.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sleepyhead/Graphs/glcommon.h b/sleepyhead/Graphs/glcommon.h index af95cdb8..4d3ed340 100644 --- a/sleepyhead/Graphs/glcommon.h +++ b/sleepyhead/Graphs/glcommon.h @@ -73,9 +73,12 @@ void LinedRoundedRectangle(int x, int y, int w, int h, int radius, int lw, QColo */ void RoundedRectangle(int x, int y, int w, int h, int radius, const QColor color); -#ifdef BUILD_WITH_MSVC -// Visual C++ doesn't have either of these in it's maths header.. I'm not surprised at Microsofts maths abilities.. +#ifndef M_PI const double M_PI = 3.141592653589793; +#endif + +#ifdef BUILD_WITH_MSVC +// Visual C++ doesn't have round in it's maths header.. double round(double number); #endif