From d62c8c002c51fb7c36487839eeeb4ac89f044dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 26 Mar 2016 13:50:43 +0100 Subject: Initial import of kxmleditor 1.1.4 --- CODING | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 CODING (limited to 'CODING') diff --git a/CODING b/CODING new file mode 100644 index 0000000..6946486 --- /dev/null +++ b/CODING @@ -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 -- cgit v1.2.3