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:
Fawzi Mohamed
2013-03-05 14:35:15 +01:00
parent c933d42370
commit ef42f53f22
5 changed files with 48 additions and 22 deletions

View File

@@ -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>());
}
}