... | ... | @@ -89,17 +89,17 @@ Many of the rules of the [FreeBS kernel style](https://www.freebsd.org/cgi/man.c |
|
|
## Doxygen
|
|
|
|
|
|
* The style is a mix of the Qt and Java style.
|
|
|
* `/*!`, not `/**`
|
|
|
* `@brief`, not `\brief`
|
|
|
* `/*!`, not `/**`
|
|
|
* `@brief`, not `\brief`
|
|
|
* order of sections:
|
|
|
* brief description
|
|
|
* long description
|
|
|
* notes
|
|
|
* warnings
|
|
|
* references
|
|
|
* parameters
|
|
|
* return values
|
|
|
* todos
|
|
|
* brief description
|
|
|
* long description
|
|
|
* notes
|
|
|
* warnings
|
|
|
* references
|
|
|
* parameters
|
|
|
* return values
|
|
|
* todos
|
|
|
* Always use `@brief` (no autobrief).
|
|
|
* Indent text (using spaces only) in multiple-line sections.
|
|
|
* In multi-line comments, opening line (`/*!`) should be empty.
|
... | ... | @@ -108,9 +108,9 @@ Many of the rules of the [FreeBS kernel style](https://www.freebsd.org/cgi/man.c |
|
|
* Use `@return` for describing return values. Usage of `@retval` (or more of them) instead of `@return if the function returns some distinct values (such as 0 for no error, -1 for something else, etc.) is also encouraged.
|
|
|
* We don't use file comments currently.
|
|
|
* Every API function/method must have a comment containing at least:
|
|
|
* a brief description
|
|
|
* parameters (if applicable)
|
|
|
* return values (if applicable)
|
|
|
* a brief description
|
|
|
* parameters (if applicable)
|
|
|
* return values (if applicable)
|
|
|
* Functions and methods are commented upon their declarations in the header files. (The only exceptions are static functions.)
|
|
|
|
|
|
```c
|
... | ... | @@ -120,7 +120,8 @@ Many of the rules of the [FreeBS kernel style](https://www.freebsd.org/cgi/man.c |
|
|
*
|
|
|
* Longer description.
|
|
|
*/
|
|
|
class SomeClass {
|
|
|
class SomeClass : public QObject {
|
|
|
Q_OBJECT
|
|
|
public:
|
|
|
/*!
|
|
|
* @brief Constructor.
|
... | ... | @@ -158,7 +159,7 @@ int someFunction(const QString &par1, QByteArray &par2); |
|
|
```
|
|
|
|
|
|
## Project File
|
|
|
* `SOURCES`, `HEADERS`, `FORMS` and other groups are **sorted alphabetically** according to the strings describing the relative path to the respective files.
|
|
|
|
|
|
* `SOURCES`, `HEADERS`, `FORMS` and other groups are **sorted alphabetically** according to the strings describing the relative path to the respective files.
|
|
|
|
|
|
If you are not sure about how to write some code consult some existing modules (e.g. `tag_item`, `table_model`). |
|
|
\ No newline at end of file |