From 4546506877d9e5f78d3c3ff13fc9eff77bc84a4e Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Fri, 10 Mar 2023 07:55:46 +0100 Subject: QDoc: Remove CodeParser::s_showInternal member and associated getter Get rid of the static CodeParser::s_showInternal member, because there's no reason for the CodeParser to have a static member that tracks whether the config is set to showInternal, when the config already carries that information around. Most of the derived CodeParsers already keep a reference to the config anyway. Get rid of it, as it is unnecessary. Task-number: QTBUG-111686 Change-Id: If658282b1c198e48dd236dc6b9eac280e2a5890e Reviewed-by: Luca Di Sera --- src/qdoc/cppcodeparser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qdoc/cppcodeparser.cpp') diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 01f044b8e..97982a782 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -587,7 +587,7 @@ void CppCodeParser::processMetaCommand(const Doc &doc, const QString &command, if (!node->isInternal()) node->setStatus(Node::Preliminary); } else if (command == COMMAND_INTERNAL) { - if (!showInternal()) + if (!Config::instance().showInternal()) node->markInternal(); } else if (command == COMMAND_REENTRANT) { node->setThreadSafeness(Node::Reentrant); @@ -874,7 +874,7 @@ void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeL Node *node = nullptr; if (args.size() == 1) { if (topic == COMMAND_FN) { - if (showInternal() || !doc.isInternal()) + if (Config::instance().showInternal() || !doc.isInternal()) node = parserForLanguage("Clang")->parseFnArg(doc.location(), args[0].first, args[0].second); } else if (topic == COMMAND_MACRO) { node = parseMacroArg(doc.location(), args[0].first); @@ -894,7 +894,7 @@ void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeL for (const auto &arg : std::as_const(args)) { node = nullptr; if (topic == COMMAND_FN) { - if (showInternal() || !doc.isInternal()) + if (Config::instance().showInternal() || !doc.isInternal()) node = parserForLanguage("Clang")->parseFnArg(doc.location(), arg.first, arg.second); } else if (topic == COMMAND_MACRO) { node = parseMacroArg(doc.location(), arg.first); -- cgit v1.2.1