mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
docs(CONTRIBUTING.md): Added documntation block
This commit is contained in:
parent
194c55a4c5
commit
7bee05eff1
|
@ -197,6 +197,57 @@ QObject notToMentionThatWeUseCamelCase;
|
||||||
|
|
||||||
E.g. https://github.com/tux3/qTox/blob/master/src/misc/flowlayout.cpp
|
E.g. https://github.com/tux3/qTox/blob/master/src/misc/flowlayout.cpp
|
||||||
|
|
||||||
|
## Documentaion
|
||||||
|
|
||||||
|
If you added a new function, also add a doxygen comment before the implementation.
|
||||||
|
If you changed an old function, make sure the doxygen comment is still correct.
|
||||||
|
If it doesn't exist add it.
|
||||||
|
|
||||||
|
Don't put docs in .h files, if there is a corresponding .cpp file.
|
||||||
|
|
||||||
|
### Documentation style
|
||||||
|
|
||||||
|
```C++
|
||||||
|
/*...license info...*/
|
||||||
|
#include "blabla.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
I can be briefly described as well!
|
||||||
|
*/
|
||||||
|
static void method()
|
||||||
|
{
|
||||||
|
// I'm just a little example.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@class OurClass
|
||||||
|
@brief Exists for some reason...!?
|
||||||
|
|
||||||
|
Longer description
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@enum OurClass::OurEnum
|
||||||
|
@brief The brief description line.
|
||||||
|
|
||||||
|
@var EnumValue1
|
||||||
|
means something
|
||||||
|
|
||||||
|
@var EnumValue2
|
||||||
|
means something else
|
||||||
|
|
||||||
|
Optional long description
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
@fn OurClass::somethingHappened(const QString &happened)
|
||||||
|
@param[in] happened tells what has happened...
|
||||||
|
@brief This signal is emitted when something has happened in the class.
|
||||||
|
|
||||||
|
Here's an optional longer description of what the signal additionally does.
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
||||||
## No translatable HTML tags
|
## No translatable HTML tags
|
||||||
|
|
||||||
Do not put HTML in UI files, or inside `tr()`. Instead, you can put put it in
|
Do not put HTML in UI files, or inside `tr()`. Instead, you can put put it in
|
||||||
|
|
Loading…
Reference in New Issue
Block a user