diff options
Diffstat (limited to 'src/qdoc/qmlcodeparser.cpp')
-rw-r--r-- | src/qdoc/qmlcodeparser.cpp | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/src/qdoc/qmlcodeparser.cpp b/src/qdoc/qmlcodeparser.cpp index 86db59a3f..58939c9c3 100644 --- a/src/qdoc/qmlcodeparser.cpp +++ b/src/qdoc/qmlcodeparser.cpp @@ -134,17 +134,13 @@ void QmlCodeParser::parseSourceFile(const Location& location, const QString& fil extractPragmas(newCode); lexer->setCode(newCode, 1); - const QSet<QString>& topicCommandsAllowed = topicCommands(); - const QSet<QString>& otherMetacommandsAllowed = otherMetaCommands(); - const QSet<QString>& metacommandsAllowed = topicCommandsAllowed + otherMetacommandsAllowed; - if (parser->parse()) { QQmlJS::AST::UiProgram *ast = parser->ast(); QmlDocVisitor visitor(filePath, newCode, &engine, - metacommandsAllowed, - topicCommandsAllowed); + topicCommands() + commonMetaCommands(), + topicCommands()); QQmlJS::AST::Node::accept(ast, &visitor); } foreach (const QQmlJS::DiagnosticMessage &msg, parser->diagnosticMessages()) { @@ -189,35 +185,6 @@ const QSet<QString>& QmlCodeParser::topicCommands() return topicCommands_; } -static QSet<QString> otherMetaCommands_; -/*! - Returns the set of strings representing the common metacommands - plus some other metacommands. - */ -const QSet<QString>& QmlCodeParser::otherMetaCommands() -{ - if (otherMetaCommands_.isEmpty()) { - otherMetaCommands_ = commonMetaCommands(); - otherMetaCommands_ << COMMAND_STARTPAGE - << COMMAND_QMLINHERITS - << COMMAND_QMLDEFAULT - << COMMAND_QMLREADONLY - << COMMAND_DEPRECATED - << COMMAND_INGROUP - << COMMAND_INTERNAL - << COMMAND_OBSOLETE - << COMMAND_PRELIMINARY - << COMMAND_SINCE - << COMMAND_ABSTRACT - << COMMAND_QMLABSTRACT - << COMMAND_INQMLMODULE - << COMMAND_INJSMODULE - << COMMAND_WRAPPER - << COMMAND_NOAUTOLIST; - } - return otherMetaCommands_; -} - #ifndef QT_NO_DECLARATIVE /*! Copy and paste from src/declarative/qml/qdeclarativescriptparser.cpp. |