Fix compilation with Qt < 4.7

Thanks to jkulesza
This commit is contained in:
Guillaume Munch 2016-06-11 05:41:48 +01:00
parent 4d9f2e740b
commit e6d28aad0a

View 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");