Task: Default to text editor font for monospaced text

This used to be hardcoded to "Monospaced" which does not work on Mac
(not even with the provided hint to choose a monospaced font).

Task-number: QTCREATORBUG-11345
Change-Id: I5d72ba9e971933fef8ef94c20333035188d33a57
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Tobias Hunger
2014-01-27 17:19:22 +01:00
parent 175066af68
commit 6c440754a8

View File

@@ -32,6 +32,8 @@
#include "task.h"
#include "projectexplorerconstants.h"
#include <texteditor/fontsettings.h>
#include <texteditor/texteditorsettings.h>
#include <utils/qtcassert.h>
using namespace ProjectExplorer;
@@ -165,8 +167,8 @@ void GccParser::amendDescription(const QString &desc, bool monospaced)
QTextLayout::FormatRange fr;
fr.start = start;
fr.length = desc.count() + 1;
fr.format.setFontFamily(QLatin1String("Monospaced"));
fr.format.setFontStyleHint(QFont::TypeWriter);
fr.format.setFont(TextEditor::TextEditorSettings::fontSettings().font());
fr.format.setFontStyleHint(QFont::Monospace);
m_currentTask.formats.append(fr);
}
return;