QmlJS: Add special severity for loading type information

The designer has to be able to handle this error/warning
explicitly. To be able to identify the warning I added
a special severity.

Change-Id: I99571497f7327a7857244ef48334c14a254c8ca0
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Thomas Hartmann
2017-03-30 13:51:18 +02:00
parent 5afc149b69
commit 7ff7aefeb3
3 changed files with 12 additions and 8 deletions

View File

@@ -436,7 +436,9 @@ protected:
const TextEditor::FontSettings &fontSettings = TextEditor::TextEditorSettings::instance()->fontSettings();
QTextCharFormat format;
if (d.severity == Severity::Warning || d.severity == Severity::MaybeWarning) {
if (d.severity == Severity::Warning
|| d.severity == Severity::MaybeWarning
|| d.severity == Severity::ReadingTypeInfoWarning) {
format = fontSettings.toTextCharFormat(TextEditor::C_WARNING);
} else if (d.severity == Severity::Error || d.severity == Severity::MaybeError) {
format = fontSettings.toTextCharFormat(TextEditor::C_ERROR);