]> git.lyx.org Git - features.git/commitdiff
Qt4 compilable again
authorPavel Sanda <sanda@lyx.org>
Mon, 28 Sep 2020 14:34:42 +0000 (16:34 +0200)
committerPavel Sanda <sanda@lyx.org>
Mon, 28 Sep 2020 14:34:42 +0000 (16:34 +0200)
src/frontends/qt/GuiFontMetrics.cpp

index 77e04a1ce2ebb9c79cb31430ab7acf350a50da2d..353a74e523ddca6ae743b0a518a67f0f2ea8d744 100644 (file)
 #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),