diff options
author | Paul Wicking <paul.wicking@qt.io> | 2023-03-10 07:55:46 +0100 |
---|---|---|
committer | Paul Wicking <paul.wicking@qt.io> | 2023-03-10 18:09:17 +0100 |
commit | 4546506877d9e5f78d3c3ff13fc9eff77bc84a4e (patch) | |
tree | d342f572b2b87fb559f65295c5f234b01d6504b9 /src/qdoc/cppcodeparser.cpp | |
parent | 4814f1655b410f113ae7381e565f50c3e5a41469 (diff) | |
download | qttools-4546506877d9e5f78d3c3ff13fc9eff77bc84a4e.tar.gz |
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 <luca.disera@qt.io>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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); |