diff options
author | Martin Smith <martin.smith@qt.io> | 2017-03-03 10:17:59 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-08-10 07:34:42 +0000 |
commit | b86d55979aa04b083d558814a4c17a526638d7d7 (patch) | |
tree | 3eb33170f5e45b1a66282e2e4a87f87871879155 /src/qdoc/cppcodemarker.cpp | |
parent | d40aac3a115e5ac8cfc11df74384a4900959a962 (diff) | |
download | qttools-b86d55979aa04b083d558814a4c17a526638d7d7.tar.gz |
qdoc: Make qdoc handle ref qualifiers correctly
This update makes qdoc parse and record the presence of
ref qualifiers on the end of function declarations. It
unfortunately increases the number of qdoc errors
reported in QtBase, but that is because these functions
are not documented correctly. There will be another
update to qdoc to allow documenting multiple functions
with a single comment, which is needed for documenting
these ref qualified functions but also can be useful in
other contexts.
Change-Id: If2efb1a71c683a465d66608a20e238d84ea45d9a
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodemarker.cpp')
-rw-r--r-- | src/qdoc/cppcodemarker.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qdoc/cppcodemarker.cpp b/src/qdoc/cppcodemarker.cpp index 1dae6bb40..387f2ac74 100644 --- a/src/qdoc/cppcodemarker.cpp +++ b/src/qdoc/cppcodemarker.cpp @@ -186,12 +186,20 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, synopsis.append(" = delete"); else if (func->isImplicit() || func->isDefaulted()) synopsis.append(" = default"); + if (func->isRef()) + synopsis.append(" &"); + else if (func->isRefRef()) + synopsis.append(" &&"); } else if (style == Subpage) { if (!func->returnType().isEmpty() && func->returnType() != "void") synopsis += " : " + typified(func->returnType()); } else { + if (func->isRef()) + synopsis.append(" &"); + else if (func->isRefRef()) + synopsis.append(" &&"); if (func->isImplicit() || func->isDefaulted()) synopsis.append(" = default"); QStringList bracketed; |