QmlJS highlighting: Use semantics for types and binding names.

This fixes some problems with highlighting like anchors {}, allows us
to only highlight correct types and to make the binding name formatting
customizable.

Change-Id: I7ab0c0ed384108b74a2998796d868d5ced4a5310
Reviewed-on: http://codereview.qt-project.org/4669
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-12 14:00:05 +02:00
parent a8b03e9c28
commit 1a0fb751cd
5 changed files with 40 additions and 49 deletions

View File

@@ -146,6 +146,8 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
virtualMethodFormatDescriptor.format().setItalic(true);
formatDescriptions.append(virtualMethodFormatDescriptor);
formatDescriptions.append(FormatDescription(QLatin1String(C_BINDING), tr("QML Binding"), Qt::darkRed));
Format qmlLocalNameFormat;
qmlLocalNameFormat.setItalic(true);
formatDescriptions.append(FormatDescription(QLatin1String(C_QML_LOCAL_ID), tr("QML Local Id"), qmlLocalNameFormat));