blob: 660904eed8bb7ab2acf2e9cdf93c7c36207b99df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
NAMING CONVENTIONS
==================
CLASS NAMES
Class names follow Qt and KDE schema, with KXE or KXMLEditor prefix:
KXE....Dialog, KXE....View, KXE....Command for longer names.
examples: KXESpecProcInstrDialog
or
KXMLEditor.... for short names
examples: KXMLEditorShell, KXMLEditorShellIface, KXMLEditorAboutData,
KXMLEditorPart
VARIABLES
(1) prefixes for variable names
p - for pointer
psz - for "char *" and "const char *" (zero-terminated usally)
str - for TQString objects
b - for booleans
i - for integers
dlg - for dialogs
pDlg - for pointers to dialogs
cmd - for commands
pCmd - for pointers to commands
(2) prefixes for member variables
Member variables should use the prefixes defined above but should additionally
be prefixed with "m_" or "s_", if they are static.
Example:
m_pDlgConfig - the member variable is a pointer to a dialog
(3) prefixes for member functions
sig - for signals
slot - for (normal) slots
slotAct - for slots connected to actions
COMMENTS
Comments in header files should stick to the rules for KDoc / Doxygen.
Comments in CPP-files should use only the new C++-style comments // to make
it possible to comment whole functions by using the C-style comments /* ... */.
SOURCE FORMAT
The source should be formatted in ANSI style and should be intended with tabs,
like in the following example (use the "Show tabs" option or something similar
in your editor to see the tabs):
namespace foospace
{
int Foo()
{
if (isBar)
{
bar(); // this is a
// very long comment
return 1;
}
else
return 0;
}
}
ADDING NEW FILES
================
Adding a new file to our project requires the following:
* creating it in our source tree
* adding it to the file Makefile.am in the subdirectory of the new file
- all files have to be added to the EXTRA_DIST variable
- all *.cpp and *.ui files have to be added to the *_SOURCES variable
- all *.h files have to be added to the noinst_HEADERS variable
* remove old dependencies
Normally removing the .deps and .libs subdirectories should do. If the application
crashs later due to missing symbols, you have to come back to this point and do
make clean
make distclean
* in the project's root dir call
make -f Makefile.dist
./configure
make
make install (as root)
* test the application
* add the new file to CVS
* commit the new file to CVS
|