Don't show 'invalid property name' errors if we can't resolve the type.

The idea is that it may be a plugin-provided type. We don't want user
code to be riddled with error markers in that case.

Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-02-16 13:28:43 +01:00
parent bb20672a63
commit 45efd5b5b1
3 changed files with 16 additions and 8 deletions

View File

@@ -1114,9 +1114,6 @@ static void appendExtraSelectionsForMessages(
const QTextDocument *document)
{
foreach (const DiagnosticMessage &d, messages) {
if (d.isWarning())
continue;
const int line = d.loc.startLine;
const int column = qMax(1U, d.loc.startColumn);
@@ -1130,7 +1127,11 @@ static void appendExtraSelectionsForMessages(
else
sel.cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
sel.format.setUnderlineColor(Qt::red);
if (d.isWarning())
sel.format.setUnderlineColor(Qt::darkYellow);
else
sel.format.setUnderlineColor(Qt::red);
sel.format.setUnderlineStyle(QTextCharFormat::WaveUnderline);
sel.format.setToolTip(d.message);