diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /cervisia/HACKING | |
download | tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'cervisia/HACKING')
-rw-r--r-- | cervisia/HACKING | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/cervisia/HACKING b/cervisia/HACKING new file mode 100644 index 00000000..dfa61cdd --- /dev/null +++ b/cervisia/HACKING @@ -0,0 +1,79 @@ +Coding Style +============ + +Formatting +---------- + +- No tabs. +- Indent is 4 spaces. +- A line should not exceed 80 chars. +- Brackets are always on separate lines. +- Put spaces between brackets of if, while and + similar statements. + + +Example: + +void MyClass::myFunction(const QString& arg) +{ + if( blah == "halb" ) + { + doSometing(); + } + else + { + varA = varB; + } +} + + + +Header Formatting +----------------- + +- Access modifiers are not indented. +- Double inclusion guard defines are all upper case + letters and are composed of the namespace (if available), + the classname and a H suffix separated by underscores. +- Inside a namespace there is no indentation. + + +Example: + +#ifndef NAMESPACE_MYCLASS_H +#define NAMESPACE_MYCLASS_H + +namespace Namespace +{ + +class MyClass +{ +public: + MyClass(); + +private: + int m_intVar; + KProcess* m_proc; +}; + +} + +#endif + + + +Class and File Names +-------------------- + + + +Class and Variable Names +------------------------ + +- For class, variable and function names separate multiple + words by uppercasing the words preceded by other words. +- Class names start with an uppercase letter. +- Function names start with a lowercase letter. +- Variable names start with a lowercase letter. +- Member Variables of a class start with a 'm_' prefix + followed by an lowercase letter.
\ No newline at end of file |