From 52ea36798268607f0cc1ed76d7289ca868132bf0 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Mon, 28 Sep 2020 16:34:42 +0200 Subject: [PATCH] Qt4 compilable again --- src/frontends/qt4/GuiFontMetrics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index 2e20a0857c..5bdbf187c7 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -28,7 +28,12 @@ #include #include #include + +#if QT_VERSION >= 0x050100 #include +#else +#define qDegreesToRadians(degree) (degree * (M_PI / 180)) +#endif using namespace std; using namespace lyx::support; @@ -110,7 +115,6 @@ inline QChar const ucs4_to_qchar(char_type const ucs4) } } // namespace - GuiFontMetrics::GuiFontMetrics(QFont const & font) : font_(font), metrics_(font, 0), strwidth_cache_(cache_metrics_width_size),