[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/areas/pim/development
From: Ingo Klöcker <kloecker () kde ! org>
Date: 2011-01-31 22:29:18
Message-ID: 20110131222918.9BB8A3E1F1 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1218181 by kloecker:
Point this page to the corresponding KDE Community Wiki page.
M +2 -128 coding-korganizer.php
--- trunk/www/areas/pim/development/coding-korganizer.php #1218180:1218181
@@ -6,136 +6,10 @@
?>
<!-- BEGIN CONTENT -->
+<p>The content of pim.kde.org is being moved to the <a \
href="http://community.kde.org/KDE_PIM">KDE PIM section</a> of the <a \
href="http://community.kde.org/">KDE Community Wiki</a>.</p>
+<p><a href="http://community.kde.org/KDE_PIM/Development/CodingStyle/Korganizer">This \
page has already been moved.</a></p>
-<p>
-This document describes the basic guidelines for hacking on KOrganizer,
-libkcal and libkabc.
-</p>
-
- <h2>Formatting</h2>
-
-<ul>
- <li>No Tabs</li>
- <li>Indent with 2 spaces</li>
- <li>A line must not have more than 100 chars</li>
- <li>
- If the arguments of a function don't fit into the 100 chars, start a new
- line and align the additional arguments with the first one.
- </li>
- <li>Put spaces between operators and arguments</li>
- <li>Put spaces between brackets and arguments of functions</li>
- <li>
- For pointer and reference variable declarations put a space between the
- type and the <tt>*</tt> or <tt>&</tt> and no space before the variable name.
- </li>
- <li>For if, else, while and similar statements put the brackets on the same line \
as the statement</li>
- <li>Function and class definitions have their brackets on separate lines</li>
-</ul>
-
-<p />
-
-<pre>
-void MyClass::myFunction( MyPointer *pointer, MyReference &ref,
- Argl *oerx )
-{
- if ( blah == false ) {
- blubbVariable = arglValue;
- } else {
- blubbVariable = oerxValue;
- }
-}
-</pre>
-
-
- <h2>Header Formatting</h2>
-
-<ul>
- <li>General formatting rules apply</li>
- <li>Access modifiers are indented</li>
- <li>Put curly brackets of class definitions on its own line</li>
- <li>Double inclusion protection defines are all upper case letters and are
- composed of the namespace (if available), the classname and a H suffix
- separated by underscores</li>
- <li>Inside a namespace there is no indentation</li>
-</ul>
-
-<pre>
-#ifndef XKJ_MYCLASS_H
-#define XKJ_MYCLASS_H
-
-namespace XKJ {
-
-class MyClass
-{
- public:
- MyClass();
-
- private:
- int mMyInt;
-};
-
-}
-
-#endif
-</pre>
-
- <h2>API docs</h2>
-
-<ul>
- <li>Each public function must have a Doxygen compatible comment in the header</li>
- <li>Use C-style comments without additional asterisks</li>
- <li>Comments should be grammatically correct, e.g. sentences start with
- uppercase letters and end with a full stop</li>
- <li>Be concise</li>
-</ul>
-
-<pre>
- /**
- This function makes tea.
-
- @param cups number of cups.
- @result tea
- */
- Tea *makeTea( int cups );
-</pre>
-
-
- <h2>Class and File Names</h2>
-
-<ul>
- <li>Put classes in files, which have the same name as the class, but only \
lower-case letters</li>
- <li>Designer-generated files should have a name classname_base.ui and should
- contain a class called ClassnameBase</li>
- <li>Classes inheriting from designer-generated classes have the same name as
- the generated class, but without the Base suffix</li>
-</ul>
-
-
- <h2>Class and Variable Names</h2>
-
-<ul>
- <li>For class, variable, function names separate multiple words by upper-casing
- the words preceded by other words</li>
- <li>Class names start with an upper-case letter</li>
- <li>Function names start with a lower-case letter</li>
- <li>Variable names start with a lower-case letter</li>
- <li>Member variables of a class start with "m" followed by an upper-case \
letter</li>
-</ul>
-
- <h2>Misc</h2>
-
-<ul>
- <li>
- Use <tt>true</tt> and <tt>false</tt> instead of <tt>TRUE</tt> and
- <tt>FALSE</tt>. These are the C++ keywords after all.
- </li>
- <li>
- A null pointer is <tt><b>0</b></tt>, not <tt>0l</tt>, <tt>0L</tt> or
- <tt>NULL</tt>. Once again, this is C++, not C.
- </li>
-</ul>
-
<!-- END CONTENT -->
<?php
include "footer.inc";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic