From 7bee05eff17cde17bfdfb70d0abbf7487ddfbc9d Mon Sep 17 00:00:00 2001 From: Diadlo Date: Wed, 27 Jul 2016 01:21:47 +0300 Subject: [PATCH] docs(CONTRIBUTING.md): Added documntation block --- CONTRIBUTING.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95ff0ddb0..86935acd0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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