From: Guillaume Munch Date: Sat, 11 Jun 2016 04:41:48 +0000 (+0100) Subject: Fix compilation with Qt < 4.7 X-Git-Tag: 2.2.1~162 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e6d28aad0a6f267c5ce51c5205fdb60343a7fc90;p=features.git Fix compilation with Qt < 4.7 Thanks to jkulesza --- diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 8b613794df..2c166a4adb 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -2584,8 +2584,10 @@ QFont const GuiApplication::typewriterSystemFont() QFont font("monospace"); #endif if (!isFixedPitch(font)) { +#if QT_VERSION >= 0x040700 // try to enforce a real monospaced font font.setStyleHint(QFont::Monospace); +#endif if (!isFixedPitch(font)) { font.setStyleHint(QFont::TypeWriter); if (!isFixedPitch(font)) font.setFamily("courier");