1,916 changes: 1,916 additions & 0 deletions doc/CODING.html

Large diffs are not rendered by default.

95 changes: 37 additions & 58 deletions doc/CODING.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ Enumerated types should be named in CamelCase with a leading capital e.g.:
Feet,
Degrees,
UnknownUnit
} ;
};
```

Do not use generic type names that will conflict with other types. e.g. use
"UnkownUnit" rather than "Unknown"

== Global Constants ==
== Global Constants & Macros ==

Global constants should be written in upper case underscore separated e.g.:
Global constants and macros should be written in upper case underscore separated e.g.:

```
const long GEOCRS_ID = 3344;
Expand All @@ -231,11 +231,19 @@ requirements are met.
Set your editor to emulate tabs with spaces. Tab spacing should be set to 2
spaces.

**Note:** In vim this is done with set expandtab ts=2

=== Indentation ===
Source code should be indented to improve readability. There is a .indent.pro
file in the QGIS src directory that contains the switches to be used when
indenting code using the GNU indent program. If you don't use GNU indent, you
should emulate these settings.

Source code should be indented to improve readability. There is a
scripts/prepare-commit.sh that looks up the changed files and reindents them
using astyle. This should be run before committing. You can also use
``scripts/astyle.sh`` to indent individual files.

As newer versions of astyle indent differently than the version used to do a
complete reindentation of the source, the script uses an old astyle version,
that we include in our repository (enable WITH_ASTYLE in cmake to include it in
the build).

=== Braces ===
Braces should start on the line following the expression:
Expand All @@ -251,20 +259,10 @@ Braces should start on the line following the expression:
}
```

There is a scripts/prepare-commit.sh that looks up the changed files and
reindents them using astyle. This should be run before committing.

As newer versions of astyle indent differently than the version used to do a
complete reindentation of the source, the script uses an old astyle version,
that we include in our repository.

== API Compatibility ==

From QGIS 1.0 we will provide a stable, backwards compatible API. This will
provide a stable basis for people to develop against, knowing their code will
work against any of the 1.x QGIS releases (although recompiling may be
required).Cleanups to the API should be done in a manner similar to the
Trolltech developers e.g.
We try to keep the API stable and backwards compatible. Cleanups to the API
should be done in a manner similar to the Trolltech developers e.g.


```
Expand All @@ -273,15 +271,28 @@ class Foo
public:
/** This method will be deprecated, you are encouraged to use
doSomethingBetter() rather.
@see doSomethingBetter()
@deprecated doSomethingBetter()
*/
bool doSomething();
Q_DECL_DEPRECATED bool doSomething();

/** Does something a better way.
@note This method was introduced in QGIS version 1.1
@note added in 1.1
*/
bool doSomethingBetter();

signal:
/** This signal will be deprecated, you are encouraged to
connect to somethingHappenedBetter() rather.
@deprecated use somethingHappenedBetter()
*/
#ifndef Q_MOC_RUN
Q_DECL_DEPRECATED
#endif
bool somethingHappened();

/** Something happened
@note added in 1.1
bool somethingHappenedBetter();
}
```

Expand Down Expand Up @@ -335,28 +346,7 @@ or this:
if ( ! a && b )
```

=== Add Trailing Identifying Comments ===

Adding comments at the end of function, struct and class implementations makes
it easier to find them later.


Consider that you're at the bottom of a source file and need to find a very
long function -- without these kinds of trailing comments you will have to page
up past the body of the function to find its name. Of course this is ok if you
wanted to find the beginning of the function; but what if you were interested
at code near its end? You'd have to page up and then back down again to the
desired part.

e.g.,

```
void foo::bar()
{
// ... imagine a lot of code here
} // foo::bar()
```

**Note:** prepare-commit.sh will take care of this.

=== Use Braces Even for Single Line Statements ===

Expand All @@ -370,7 +360,7 @@ Consider:
```
if (foo)
bar();
else
else
baz();
```

Expand All @@ -387,7 +377,7 @@ So, prefer this:
}
else
{
baz();
baz();
}
```

Expand Down Expand Up @@ -421,7 +411,7 @@ sudo apt-get install git

=== Install git for Windows ===

Windows users can obtain [msys git http://code.google.com/p/msysgit/].
Windows users can obtain [msys git http://code.google.com/p/msysgit/] or use git distributed with [cygwin http://cygwin.com].

=== Install git for OSX ===

Expand Down Expand Up @@ -679,8 +669,6 @@ submit patches which are unencumbered by conflicting intellectual property
rights. Also do not submit code that you are not happy to have made available
under the GPL.



== Obtaining GIT Write Access ==

Write access to QGIS source tree is by invitation. Typically when a person
Expand Down Expand Up @@ -1506,12 +1494,3 @@ guidelines are followed in layout and design of GUIs.
- Marco Hugentobler
-

Original pages from wiki to deprecate:

- http://wiki.qgis.org/qgiswiki/CodingGuidelines (./)
- http://wiki.qgis.org/qgiswiki/CodingStandards (./)
- http://wiki.qgis.org/qgiswiki/UsingSubversion (./)
- http://www.qgis.org/wiki/How_to_debug_QGIS_Plugins
- http://wiki.qgis.org/qgiswiki/DevelopmentInBranches (./)
- http://wiki.qgis.org/qgiswiki/SubmittingPatchesAndSvnAccess (./)

42 changes: 19 additions & 23 deletions doc/INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>QGIS</TITLE>

<!-- Included /home/fischer/src/qgis/qgis/doc/style.css -->
<!-- Included /home/fischer/src/qgis/doc/style.css -->
<STYLE TYPE="text/css">
body{ background: white;
color: black;
Expand Down Expand Up @@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>QGIS</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Saturday November 30, 2013</H3>
<H3>Saturday January 25, 2014</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Saturday November 30, 2013
Last Change : Saturday November 30, 2013
Last Updated: Saturday January 25, 2014
Last Change : Thursday November 21, 2013
</P>
<DIV CLASS="toc">

Expand Down Expand Up @@ -293,36 +293,32 @@ <H2>3.3. Install build dependencies</H2>
<TH>install command for packages</TH>
</TR>
<TR>
<TD>lucid</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git-core graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
</TR>
<TR>
<TD>maverick</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>precise</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb</CODE></TD>
</TR>
<TR>
<TD>natty</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>quantal</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb</CODE></TD>
</TR>
<TR>
<TD>oneiric</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>raring</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libpython2.7-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb</CODE></TD>
</TR>
<TR>
<TD>precise</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>saucy</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libpython2.7-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb</CODE></TD>
</TR>
<TR>
<TD>sid</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>wheezy</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb</CODE></TD>
</TR>
<TR>
<TD>squeeze</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>jessie</TD>
<TD><CODE>apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev</CODE></TD>
</TR>
<TR>
<TD>wheezy</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-base xvfb</CODE></TD>
<TD>sid</TD>
<TD><CODE>apt-get install bison cmake doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal-dev libgeos-dev libgsl0-dev libopenscenegraph-dev libosgearth-dev libpq-dev libproj-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python-all python-all-dev python-qt4 python-qt4-dev python-sip python-sip-dev txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb</CODE></TD>
</TR>
</TABLE>

Expand Down Expand Up @@ -3227,5 +3223,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/qgis/debian/build/doc/INSTALL.html -t html /home/fischer/src/qgis/qgis/doc/INSTALL.t2t -->
<!-- cmdline: txt2tags -o/home/fischer/src/qgis/debian/build/doc/INSTALL.html -t html /home/fischer/src/qgis/doc/INSTALL.t2t -->
</BODY></HTML>