[LyX/2.3.x] Backport GuiFontLoader deprecation warning fixes
Juergen Spitzmueller
spitz at lyx.org
Sat Mar 13 11:01:03 UTC 2021
commit 85ece5fb3d3e6783fc0cb360f362796e82ecc62e
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Sat Mar 13 12:04:58 2021 +0100
Backport GuiFontLoader deprecation warning fixes
---
src/frontends/qt4/GuiFontLoader.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt4/GuiFontLoader.cpp b/src/frontends/qt4/GuiFontLoader.cpp
index 39e7907..130e5b9 100644
--- a/src/frontends/qt4/GuiFontLoader.cpp
+++ b/src/frontends/qt4/GuiFontLoader.cpp
@@ -226,6 +226,7 @@ QFont symbolFont(QString const & family, bool * ok)
return font;
}
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
// A simple setFamily() fails on Qt 2
QString const raw = rawName(family);
@@ -237,6 +238,7 @@ QFont symbolFont(QString const & family, bool * ok)
*ok = true;
return font;
}
+#endif
LYXERR_NOPOS(Debug::FONT, " FAILED :-(");
*ok = false;
@@ -370,7 +372,9 @@ QFont makeQFont(FontInfo const & f)
else
LYXERR(Debug::FONT, "This font is NOT an exact match");
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
LYXERR(Debug::FONT, "XFLD: " << font.rawName());
+#endif
font.setPointSizeF(f.realSize() * lyxrc.currentZoom / 100.0);
More information about the lyx-cvs
mailing list