diff options
author | Martin Smith <martin.smith@qt.io> | 2017-01-19 12:40:19 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2017-08-10 07:34:07 +0000 |
commit | 0a889ecef4f965d4e5768dc9a9c1eb827df35722 (patch) | |
tree | 7228606810a3c6cc10e5465e68d11735e6f5d220 /src/qdoc/cppcodeparser.cpp | |
parent | 015a0fdf3e89993efd4905c688f4f1de8b522cbb (diff) | |
download | qttools-0a889ecef4f965d4e5768dc9a9c1eb827df35722.tar.gz |
qdoc: Clean up the Parameter class
The way function signatures are specified is changing.
A basic assumption of qdoc was that in the function
signature specified with the \fn command, each formal
parameter would have a name, and the name would be
documentede in the text using the \a markup. This is
no longer valid. There are now several cases in Qt where
std::nullptr_t is used to specify a formal parameter, and
no parameter name is provided. Furthermore, there are
a few cases where some other type is used as the
parameter type and no parameter name is given.
The meaning in the first case is that the function must
be called with NULL, and the meaning in the second case
is that the parameter is not used in the function implementation.
This clean up task must be accomplished in preparation for
implementing the changes described above. The Parameter
class had become a kludge. The so-called "rightType_" data
member (which has not been used for quite a long time now
and which was marked for removal long ago) is removed here.
The change also affects the <parameter> element in the .index
file, where the "right" item is removed and the "left" item is
renamed to "type" . This index file change might break 3rd
party applications that parse qdoc's index files, but I think
there is only one, so be on the lookout for a complaint from
that guy.
Task-number: QTBUG-58277
Change-Id: I721bebdd5d0f2fcd65324373c3a3ec3ea1c33e26
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/cppcodeparser.cpp')
-rw-r--r-- | src/qdoc/cppcodeparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index a71c341a7..04e06783e 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -272,7 +272,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, Parameter ¶m = params[i]; if (param.name().isEmpty() && !param.dataType().isEmpty() && param.dataType() != "...") - param = Parameter("", "", param.dataType()); + param = Parameter("", param.dataType()); } func->setParameters(params); } |