Skip to content
zetok edited this page Mar 21, 2015 · 21 revisions

Guidelines for code and contributing it.

Coding style

function()
{
    1st_line;
    2nd_line;
}

// if / while / for
if ()
    1_line;
else if ()
    just_one_line;
else
    each_statement;

if ()
{
    1_line;
}
else if ()
{
    what_if;
    i_told_you;
}
else
{
    that_there_are;
    more_lines;
}

QObject* asterisksGoWithTheType;
uint8_t* array = new uint8_t[count];

QObject notToMentionThatWeUseCamelCase;
// *camelCase, not CamelCase

E.g. https://github.com/tux3/qTox/blob/master/src/misc/flowlayout.cpp

general tips

  • commits should have meaningful descriptions (something like just fix #123 is not acceptable, if you want it in your commit put it in lines below)
  • … (WIP)
Clone this wiki locally