Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Syntax Questions
I'm going through an older Qt project, and I'm recognizing the syntax. I'm seeing three backslashes "///" and on that line there's an @ something. Like @file or @author, followed by a file name or a person name respectively. Its not hard to read, but I don't recognize that as C++ syntax. They look like Java comments, but I'm only familiar with Java.
Can someone explain what the deal is here? Is this a special Qt function?
This might be "Doxygen":http://www.stack.nl/~dimitri/doxygen/commands.html syntax.
If so these lines are comment lines and may be parsed by Doxygen for generating doucmentation. See the provided link for more details.
Does Qt support Doxygen then?
amleto last edited by
qt and doxygen are orthogonal
If I remember correctly Qt used also Doxygen for documentation in the past. However, it is typically not relevant. A documentation of Qt classes are readily available.
Doxygen is basically a special way to format for source code comment, so that they may retrieve certain information and assemble documentation.
Note: If you have an application's source code which is using the Doxygen notation in its comments, it has no influence on the application itself.
andre last edited by
[quote author="koahnig" date="1330976719"]If I remember correctly Qt used also Doxygen for documentation in the past.[/quote]
Qt did not use doxygen in the past. Here is the "history":http://rant.gulbrandsen.priv.no/udoc/history :-)
foxyz last edited by
Your means the code like:
static char CCId = "@(#) @$Id: CompareDock.cc,v 1.19 2010/12/03 19:54:51 Giant Exp $";
[quote author="Andre" date="1330978716"]
Qt did not use doxygen in the past. Here is the "history":http://rant.gulbrandsen.priv.no/udoc/history :-)[/quote]
Thanks for correcting my memory ;-) Interesting link with compact information.
giesbert last edited by
[quote author="foxyz" date="1331023084"]Your means the code like:
static char CCId = "@(#) @$Id: CompareDock.cc,v 1.19 2010/12/03 19:54:51 Giant Exp $";[/quote]
this is not doxygen. This is a special technique to put version information into a binary in a platform independant way. YOu can open the binary and search for tags like "@(#)".
Here is an example:
@/// @author <someone elses name@
goetz last edited by
It's qdoc markup to generate the docs. It's more or less compatible with Doxygen.