diff options
author | Marco Bubke <marco.bubke@theqtcompany.com> | 2015-12-09 12:24:53 +0100 |
---|---|---|
committer | Marco Bubke <marco.bubke@theqtcompany.com> | 2015-12-09 11:31:02 +0000 |
commit | 6e5f90917f4cbe092816ac82434f827f67082f4d (patch) | |
tree | f818911b5f2a90ce67925d4dd95735cae2990a48 /src/plugins/debugger/qml/qmlengineutils.cpp | |
parent | 4453ed4fc2ce5a0a662f8b6172562c16a1ca5eed (diff) | |
download | qt-creator-6e5f90917f4cbe092816ac82434f827f67082f4d.tar.gz |
Use text settings instead of hard coded diagnostic text formats
Change-Id: Id51d03a46b4403d9224508ff3c7647b829ee69cd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmlengineutils.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlengineutils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/debugger/qml/qmlengineutils.cpp b/src/plugins/debugger/qml/qmlengineutils.cpp index 50f707d005..684d7b69b2 100644 --- a/src/plugins/debugger/qml/qmlengineutils.cpp +++ b/src/plugins/debugger/qml/qmlengineutils.cpp @@ -36,8 +36,10 @@ #include <coreplugin/editormanager/documentmodel.h> +#include <texteditor/fontsettings.h> #include <texteditor/textdocument.h> #include <texteditor/texteditor.h> +#include <texteditor/texteditorsettings.h> #include <QTextBlock> @@ -248,10 +250,8 @@ QStringList highlightExceptionCode(int lineNumber, const QString &filePath, cons QStringList messages; QList<IEditor *> editors = DocumentModel::editorsForFilePath(filePath); - // set up the format for the errors - QTextCharFormat errorFormat; - errorFormat.setUnderlineStyle(QTextCharFormat::SingleUnderline); - errorFormat.setUnderlineColor(Qt::red); + const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::instance()->fontSettings(); + QTextCharFormat errorFormat = fontSettings.toTextCharFormat(TextEditor::C_ERROR); foreach (IEditor *editor, editors) { TextEditorWidget *ed = qobject_cast<TextEditorWidget *>(editor->widget()); |