summaryrefslogtreecommitdiff
path: root/src/qdoc/cppcodemarker.cpp
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2021-03-19 11:16:26 +0100
committerPaul Wicking <paul.wicking@qt.io>2021-04-28 12:39:04 +0200
commit1637d91efd8fb389bc09bdaa960f5d9d4f9e0164 (patch)
tree17d5a8aea7e85f57b9f8e9cdbcbac58b83a0f16f /src/qdoc/cppcodemarker.cpp
parentcbc5277f1d38bad75ced13d20f9ef914bc9b5950 (diff)
downloadqttools-1637d91efd8fb389bc09bdaa960f5d9d4f9e0164.tar.gz
QDoc: Add \deprecatedsince command
As deprecated methods may stick around over a couple of versions, add a command that lets us record which version something was deprecated in. [ChangeLog][qdoc] QDoc now lets you record the version something is deprecated in with the new \deprecatedsince command. Fixes: QTBUG-58249 Change-Id: I69de350502580f446008f717462bbc1c4c251564 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r--src/qdoc/cppcodemarker.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp
index 9846a0dd8..f7b6d99ae 100644
--- a/src/qdoc/cppcodemarker.cpp
+++ b/src/qdoc/cppcodemarker.cpp
@@ -299,9 +299,12 @@ QString CppCodeMarker::markedUpQmlItem(const Node *node, bool summary)
if (summary) {
if (node->isPreliminary())
extra += " (preliminary)";
- else if (node->isDeprecated())
- extra += " (deprecated)";
- else if (node->isObsolete())
+ else if (node->isDeprecated()) {
+ if (const QString &version = node->deprecatedSince(); !version.isEmpty())
+ extra += " (deprecated since " + version + ")";
+ else
+ extra += " (deprecated)";
+ } else if (node->isObsolete())
extra += " (obsolete)";
}