From 7627e5f84e7067ef4e28ef6bdb3d3ba1e87f1a3b Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Wed, 8 Apr 2020 09:26:13 +0200 Subject: [PATCH] Fix highlighting for new QML keywords in Qt 5.15 Change-Id: I2e45321eccb209fa9c9c524d85dc9e08d8bd23fa Reviewed-by: Eike Ziller Reviewed-by: Christian Stenger --- src/plugins/qmljseditor/qmljshighlighter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmljseditor/qmljshighlighter.cpp b/src/plugins/qmljseditor/qmljshighlighter.cpp index afab8ab3c7e..6608a93a690 100644 --- a/src/plugins/qmljseditor/qmljshighlighter.cpp +++ b/src/plugins/qmljseditor/qmljshighlighter.cpp @@ -210,9 +210,11 @@ bool QmlJSHighlighter::maybeQmlKeyword(const QStringRef &text) const return true; else if (ch == QLatin1Char('a') && text == QLatin1String("alias")) return true; + else if (ch == QLatin1Char('c') && text == QLatin1String("component")) + return true; else if (ch == QLatin1Char('s') && text == QLatin1String("signal")) return true; - else if (ch == QLatin1Char('r') && text == QLatin1String("readonly")) + else if (ch == QLatin1Char('r') && (text == QLatin1String("readonly") || text == QLatin1String("required"))) return true; else if (ch == QLatin1Char('i') && text == QLatin1String("import")) return true;