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;