forked from OtterBrowser/otter-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HACKING
18 lines (15 loc) · 1.69 KB
/
HACKING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
If you want to help in development of Otter Browser then you are advised to follow some rules.
It is good idea to first check if someone is assigned to work on specified feature (to avoid work duplication), starting with issue tracker [1].
If not then you are advised to ask on IRC channel (#otter-browser at freenode) if anyone is assigned.
Next step is to create ticket which will be assigned to you.
All code is required to follow Allman indentation style[2], using tabs (spaces are not acceptable, in worst case you can use astyle to convert them before submitting).
You are required to follow naming scheme consistent witch existing code (for method names, variables, enums, classes and structures).
Use const as much as possible (both for local variables and method signatures).
Wrap text correctly using QString, QStringLiteral or QLatin1String[3], remember to use tr() for translateable texts.
Avoid long lines but also try to not break if statements etc. - this is role of IDE.
Use pointers only when it makes sense, usually derive classes from QObject and remember to set parent or delete them when no longer used (use deleteLater() for QObject derived ones).
Try to keep proper order of methods in source file, it should start with declaration of constructor, followed by destructor, methods returning void (reimplementations of *Event methods and others should go first), followed by setters and methods returning value (from pointers through data structures to primitive data types).
In case of doubt you can consult existing source files or ask me on IRC.
[1] https://github.com/Emdek/otter/issues?state=open
[2] http://en.wikipedia.org/wiki/Indent_style#Allman_style
[3] http://woboq.com/blog/qstringliteral.html]