forked from qt-creator/qt-creator
qmljs: do not show warnings for not fully supported languages
Change-Id: Ie153caefcbb0f5d6d627697fd324d0cd0e3fa31f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
@@ -667,11 +667,13 @@ void QmlJSTextEditorWidget::onDocumentUpdated(QmlJS::Document::Ptr doc)
|
||||
m_futureSemanticInfoRevision = doc->editorRevision();
|
||||
m_semanticInfoUpdater->update(doc, m_modelManager->snapshot());
|
||||
setExtraSelections(CodeWarningsSelection, QList<QTextEdit::ExtraSelection>());
|
||||
} else {
|
||||
} else if (Document::isFullySupportedLanguage(doc->language())) {
|
||||
// show parsing errors
|
||||
QList<QTextEdit::ExtraSelection> selections;
|
||||
appendExtraSelectionsForMessages(&selections, doc->diagnosticMessages(), document());
|
||||
setExtraSelections(CodeWarningsSelection, selections);
|
||||
} else {
|
||||
setExtraSelections(CodeWarningsSelection, QList<QTextEdit::ExtraSelection>());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user