Skip to content
Snippets Groups Projects
Commit 6c440754 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

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: default avatarEike Ziller <eike.ziller@digia.com>
parent 175066af
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment