]> git.lyx.org Git - features.git/commitdiff
Fix compilation with Qt < 4.7
authorGuillaume Munch <gm@lyx.org>
Sat, 11 Jun 2016 04:41:48 +0000 (05:41 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 12 Jun 2016 22:12:24 +0000 (23:12 +0100)
Thanks to jkulesza

src/frontends/qt4/GuiApplication.cpp

index 8b613794df03bfbe45baeb78d251d41d0a3dbadd..2c166a4adb25825081ba4fa7ab1085f7ff61da7a 100644 (file)
@@ -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");