docs(CONTRIBUTING.md): Added documntation block

pull/3536/head
Diadlo 2016-07-27 01:21:47 +03:00
parent 194c55a4c5
commit 7bee05eff1
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
1 changed files with 51 additions and 0 deletions

View File

@ -197,6 +197,57 @@ QObject notToMentionThatWeUseCamelCase;
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
Do not put HTML in UI files, or inside `tr()`. Instead, you can put put it in