diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 13:50:43 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 13:50:43 +0100 |
commit | d62c8c002c51fb7c36487839eeeb4ac89f044dee (patch) | |
tree | bb4d1f5c631ab1f22a3018ba39e6a806035f80fd /CODING | |
download | kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.tar.gz kxmleditor-d62c8c002c51fb7c36487839eeeb4ac89f044dee.zip |
Initial import of kxmleditor 1.1.4
Diffstat (limited to 'CODING')
-rw-r--r-- | CODING | 91 |
1 files changed, 91 insertions, 0 deletions
@@ -0,0 +1,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 QString 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 |