Warning, /utilities/konsole/doc/developer/README is written in an unsupported language. File is not indexed.

0001 Developer Documentation for Konsole
0002 
0003 NOTE: this document is from 2007; a lot has changed.  Please ask on the
0004     Konsole mailing list if you need any guidance.
0005 
0006 Authors:        Robert Knight < robertknight@gmail.com >
0007 Last Updated:   7th May 2007
0008 Summary:        Introduction to Konsole developer documentation
0009 ===============================================================
0010 
0011 Contents:
0012 
0013 1.      Introduction
0014 2.      Documentation format
0015 3.      Documentation layout (aka. 'Where to find things')
0016 4.      Contributing to Konsole
0017     4.1     Discussion and help
0018     4.2     Submitting code
0019     4.2.1   API documentation guidelines
0020     4.2.2   Code style guidelines
0021 
0022 ===============================================================
0023 
0024 1.  Introduction
0025 
0026 This document explains the layout of the developer documentation folder,
0027 and basic guidelines for contributors.
0028 
0029 2.  Documentation format
0030 
0031 To try and make it easier for developers to find the information they need
0032 about Konsole, the use of a standard document template which answers the following
0033 questions is encouraged:
0034     
0035     - What is this document?
0036     - Who wrote it?
0037     - When was it last updated?
0038     - What is it about?
0039     - Where can I find information about <subject> within this document?
0040 
0041 The current template can be found in design/developer-documentation-template
0042 
0043 There is older documentation in the old-documents/ folder which does
0044 not follow this format.  This is kept as a reference.  Assistance
0045 in tidying up documentation from that directory by using the documentation
0046 template would be appreciated.
0047 
0048 3.  Documentation layout
0049 
0050 DELETED    design/           - Documentation about the design of Konsole, and templates 
0051                         for developer documentation.
0052 DELETED    design/historic   - Documentation which was prepared during the KDE 4.0x development
0053                         cycle but which is no longer relevant.
0054     
0055 DELETED    research/         - Results of research into user's experiences with Konsole
0056 
0057 DELETED    user-interface/   - Documentation concerning design and analysis of the user interface.
0058 
0059 DELETED    old-documents/  - An assortment of documentation which was created during earlier
0060                       releases of Konsole.  There is useful information here, particularly
0061                       about the type of terminal which Konsole emulates, but it is not
0062                       organised.
0063 
0064 4.  Contributing to Konsole
0065 
0066 Help with Konsole's development, whether it involves code, user interface suggestions or 
0067 other resources is greatly appreciated.
0068 
0069 4.1 Discussion and help
0070 
0071 Discussion about Konsole development takes place primarily on the Konsole mailing list,
0072 at konsole-devel@kde.org.  If you need help with Konsole development or wish to discuss
0073 implementation of a feature, fixes to bugs etc., then this is an appropriate place to
0074 do that.
0075 
0076 4.2  Submitting code
0077 
0078 Patches can be submitted for Konsole in a number of places:
0079 
0080     - For bugfixes, we recommend that you attach the patch to the relevant bug report on bugs.kde.org
0081     - For new features, a patch can be attached to a relevant wishlist report on bugs.kde.org if 
0082       there is one, and/or submitted to konsole-devel@kde.org
0083    
0084     If your patch adds new methods or classes then please ensure that there is API documentation for
0085     them in the code.  Looking at the header files for existing classes should give you an idea of 
0086     what is asked for.  
0087 
0088    
0089 4.2.1  API documentation guidelines
0090 
0091    Good API documentation in the code is very helpful for other developers.  Here are a few guidelines on 
0092    writing API documentation for Konsole:
0093 
0094         - All classes should have documentation which describes the basic function of the class.
0095           Usage examples are appreciated.
0096         - All public and protected methods should have API documentation which describes what
0097           the method does and what the returned value (if any) means.
0098           Parameter documentation is encouraged if the method has more than a couple of parameters
0099           or if the use of a parameter is not immediately clear from its name and type.
0100         - All public and protected enumerations and constants should have API documentation which
0101           describes what the various values mean.
0102         - The usage of brief standard comments next to private methods is encouraged to
0103           provide a quick explanation of what that method does.
0104 
0105 4.2.2   Code style guidelines
0106 
0107     The API style roughly follows that used in the Qt and KDE classes.  
0108 
0109     There are no strict guidelines on aspects of the code such as indentation, braces
0110     or spacing, although following the style of the existing code is a good idea.
0111     
0112     Below is a list of the most important style considerations which have been developed
0113     following experience working on earlier Konsole code:
0114 
0115     - Variables and methods should have CLEAR, verbose names.  The use of abbreviations
0116       should be avoided except for very common cases.
0117 
0118     - The use of named constants is preferred over literals for clarity, and also to prevent
0119       the need to edit each instance of a literal if the value needs to be changed.
0120 
0121     - The use of macros ( #define ) should be avoided where possible.  enums, inline methods
0122       templates, static constants etc. are strongly preferred. 
0123     - Inside classes, private member fields have an underscore prefix ( eg. _myPrivateField )
0124     - Private slots in classes DO NOT have a "slot" prefix before their name which is often
0125       seen in other KDE applications.
0126 
0127     Earlier Konsole code had a proliferation of two-letter variable names, which made it hard
0128     to read and understand in some places, and let directly to bugs in others.  Descriptive naming
0129     and sensible use of comments are strongly encouraged in new code.
0130 
0131 
0132     
0133