diff options
author | Topi Reinio <topi.reinio@qt.io> | 2022-07-14 14:44:45 +0200 |
---|---|---|
committer | Topi Reinio <topi.reinio@qt.io> | 2022-07-15 14:38:11 +0200 |
commit | 214521bf8dbf477949373fc2fbbf3ebe5dc1de37 (patch) | |
tree | 1147ede0754c4af65f58f7a191b9f346e321ebe4 /src/qdoc/cppcodeparser.cpp | |
parent | 5b71a876062cac429042affb9432f2db86a91aa7 (diff) | |
download | qttools-214521bf8dbf477949373fc2fbbf3ebe5dc1de37.tar.gz |
qdoc: Introduce \modulestate command
This command can be used in \module or \qmlmodule topic to describe a
module state other than \preliminary or \deprecated. A typical use case
is to mark modules in tech. preview:
/*!
\module QFoo
\modulestate Techical Preview
...
*/
This information is displayed on the module page itself, as well as
on the navigation bar of the module's member reference pages.
Introduce a new function, QDocDatabase::getModuleNode() that retrieves
the associated module node for any other Node instance. Use this
in HtmlGenerator::generateNavigation() and also in Tree::resolveSince()
to avoid code duplication.
Fixes: QTBUG-104591
Change-Id: Ifd85e769f6df6f06ed9938da4f9981b22a56e19e
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 6c1959503..a4a6c53fd 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -672,6 +672,15 @@ void CppCodeParser::processMetaCommand(const Doc &doc, const QString &command, doc.location().warning( QStringLiteral("Command '\\%1' is only meaningful in '\\module'.") .arg(COMMAND_QTCMAKEPACKAGE)); + } else if (command == COMMAND_MODULESTATE ) { + if (!node->isModule() && !node->isQmlModule()) { + doc.location().warning( + QStringLiteral( + "Command '\\%1' is only meaningful in '\\module' and '\\qmlmodule'.") + .arg(COMMAND_MODULESTATE)); + } else { + static_cast<CollectionNode*>(node)->setState(arg); + } } else if (command == COMMAND_NOAUTOLIST) { node->setNoAutoList(true); } |