Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
6.3
-
None
-
DaVinci sprint 53
Description
The typealias command for QDoc is used to document C++ type aliases, such as using foo = bar;.
When using a typealias command to document a public typealias from a class that was generated from a macro, QDoc seems unable to resolve the documentation to any alias.
For example, if we had an header file:
#define F(x) class x { public: using bar = int; };
F(Foo)
And somewhere a documentation:
*/!
\class Foo
...
*/
*/!
\typealias Foo::bar
*/
When generating the documenation QDoc will provide a warning and be unable to generate the typealias documentation:
(qdoc) warning: Cannot find 'Foo::bar' specified with '\typealias' in any header file
If the header file contains the equivalent of the expanded code:
class Foo { public: using bar = int; };
Then QDoc will not fail to find the alias and correctly produce the documentation.
The failure doesn't seem to be tied to generating the class itself but to the generation of the alias.
If the header files is modified to the following:
#define F using bar = int; class Foo { public: F };
QDoc will fail to find the alias.
More specifically, the issue seems to exist only when the identifier used for the alias is behind a macro. For example:
#define F bar class Foo { public: using F = int; };
Will fail but:
#define F int class Foo { public: using bar = F; };
Will succeed.
QDoc should be able to find typealiases that generates their identifier trough a macro or definition. To solve the issue, for all of the above and similar examples, QDoc should be able to generate the typealias documentation correctly.