[LyX/master] Qt4 compilable again
Pavel Sanda
sanda at lyx.org
Mon Sep 28 14:07:32 UTC 2020
commit 6d6fc761be3918e376591d956b9505006ef738e1
Author: Pavel Sanda <sanda at lyx.org>
Date: Mon Sep 28 16:34:42 2020 +0200
Qt4 compilable again
---
src/frontends/qt/GuiFontMetrics.cpp | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/frontends/qt/GuiFontMetrics.cpp b/src/frontends/qt/GuiFontMetrics.cpp
index 77e04a1..353a74e 100644
--- a/src/frontends/qt/GuiFontMetrics.cpp
+++ b/src/frontends/qt/GuiFontMetrics.cpp
@@ -28,7 +28,12 @@
#include <QByteArray>
#include <QRawFont>
#include <QtEndian>
+
+#if QT_VERSION >= 0x050100
#include <QtMath>
+#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),
More information about the lyx-cvs
mailing list